master
yaml 88 lines 4.13 KB
Raw
1 # yamllint disable rule:line-length
2 ---
3 - id: 'notify-syslog'
4 meta:
5 name: 'syslog'
6 link: ''
7 categories:
8 - notify.agent
9 icon_filename: 'syslog.png'
10 keywords:
11 - syslog
12 overview:
13 notification_description: |
14 Send notifications to Syslog using Netdata's Agent alert notification feature, which supports dozens of endpoints, user roles, and more.
15 notification_limitations: ''
16 setup:
17 prerequisites:
18 list:
19 - title: ''
20 description: |
21 - A working `logger` command for this to work. This is the case on pretty much every Linux system in existence, and most BSD systems.
22 - Access to the terminal where Netdata Agent is running
23 configuration:
24 file:
25 name: 'health_alarm_notify.conf'
26 options:
27 description: 'The following options can be defined for this notification'
28 folding:
29 title: 'Config Options'
30 enabled: true
31 list:
32 - name: 'SYSLOG_FACILITY'
33 default_value: ''
34 description: "Set `SYSLOG_FACILITY` to the facility used for logging, by default this value is set to `local6`."
35 required: true
36 - name: 'DEFAULT_RECIPIENT_SYSLOG'
37 default_value: ''
38 description: "Set `DEFAULT_RECIPIENT_SYSLOG` to the recipient you want the alert notifications to be sent to."
39 required: true
40 detailed_description: |
41 Targets are defined as follows:
42
43 ```
44 [[facility.level][@host[:port]]/]prefix
45 ```
46
47 prefix defines what the log messages are prefixed with. By default, all lines are prefixed with 'netdata'.
48
49 The facility and level are the standard syslog facility and level options, for more info on them see your local logger and syslog documentation. By default, Netdata will log to the local6 facility, with a log level dependent on the type of message (crit for CRITICAL, warning for WARNING, and info for everything else).
50
51 You can configure sending directly to remote log servers by specifying a host (and optionally a port). However, this has a somewhat high overhead, so it is much preferred to use your local syslog daemon to handle the forwarding of messages to remote systems (pretty much all of them allow at least simple forwarding, and most of the really popular ones support complex queueing and routing of messages to remote log servers).
52
53 You can define multiple recipients like this: daemon.notice@loghost:514/netdata daemon.notice@loghost2:514/netdata.
54 All roles will default to this variable if left unconfigured.
55 - name: 'SEND_SYSLOG '
56 default_value: ''
57 description: "Set SEND_SYSLOG to YES, make sure you have everything else configured before turning this on."
58 required: true
59 detailed_description: |
60 You can then have different recipients per role, by editing DEFAULT_RECIPIENT_SYSLOG with the recipient you want, in the following entries at the bottom of the same file:
61
62 ```text
63 role_recipients_syslog[sysadmin]="daemon.notice@loghost1:514/netdata"
64 role_recipients_syslog[domainadmin]="daemon.notice@loghost2:514/netdata"
65 role_recipients_syslog[dba]="daemon.notice@loghost3:514/netdata"
66 role_recipients_syslog[webmaster]="daemon.notice@loghost4:514/netdata"
67 role_recipients_syslog[proxyadmin]="daemon.notice@loghost5:514/netdata"
68 role_recipients_syslog[sitemgr]="daemon.notice@loghost6:514/netdata"
69 ```
70 examples:
71 folding:
72 enabled: true
73 title: ''
74 list:
75 - name: 'Basic Configuration'
76 folding:
77 enabled: false
78 description: ''
79 config: |
80 #------------------------------------------------------------------------------
81 # syslog notifications
82
83 SEND_SYSLOG="YES"
84 SYSLOG_FACILITY='local6'
85 DEFAULT_RECIPIENT_SYSLOG="daemon.notice@loghost6:514/netdata"
86 troubleshooting:
87 problems:
88 list: []