The sources that write to the systemd journal.
osapi dsl behavior get --name source and osapi dsl behavior method get show
the same.
Behavior
| |
|---|
| Name | source |
| Description | The sources that write to the systemd journal |
| Placement | node |
| Under | log |
| Area | logs |
| Internal | no |
| API | yes |
| CLI | yes |
| Next | no |
| Platforms | linux |
| Sudo | none |
| Runs | none |
| Writes | none |
| Keeps state | no |
| Uses | none |
| Used by | none |
Methods (1)
| NAME | VERB | HTTP | ROUTE | PERMISSION | DESCRIPTION |
|---|
| list | read | GET | /api/node/{hostname}/log/source | log:read | List the sources of the journal |
Types (1)
| NAME | INPUT | OUTPUT |
|---|
| list | ListInput | []Source { name } |
Settings (0)
None. Declare them with behavior.Config.
Telemetry
| |
|---|
| Span | behavior.source.<method> |
| Child spans | exec journalctl |
| Metrics | osapi_behavior_calls_total, osapi_behavior_duration_seconds, osapi_behavior_changes_total |
| Attributes | osapi.behavior.name, osapi.behavior.method, osapi.behavior.verb, osapi.behavior.outcome, osapi.behavior.changed |
| Recorded inputs | none |
Method list
| |
|---|
| Name | list |
| Verb | read |
| Description | List the sources of the journal |
| Detail | Runs journalctl --field=SYSLOG_IDENTIFIER: each syslog identifier that has an entry, once, sorted. A name here is what log list takes as unit when the source is a systemd unit. |
| HTTP | GET |
| Route | /api/node/{hostname}/log/source |
| Permission | log:read |
| Command | osapi client node log source list |
| Input type | ListInput |
| Output type | []Source |
None. The method takes no input; its command needs only --target.
Output (1)
| FIELD | TYPE | DESCRIPTION |
|---|
| name | string | The syslog identifier, such as sshd |
Examples (1)
| EXAMPLE | INPUT | OUTPUT |
|---|
| The sources | (none) | [name=cron] [name=nginx] [name=sshd] |