mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-03 08:01:38 +02:00
Revert "Syslog ext doc update to reflect syslog-ng 3.5.1"
This reverts commit bef267ca5f.
This commit is contained in:
+15
-31
@@ -17,56 +17,46 @@ yum install syslog-ng
|
|||||||
Once syslog-ng is installed, edit the relevant config file (most likely /etc/syslog-ng/syslog-ng.conf) and paste the following:
|
Once syslog-ng is installed, edit the relevant config file (most likely /etc/syslog-ng/syslog-ng.conf) and paste the following:
|
||||||
|
|
||||||
```ssh
|
```ssh
|
||||||
@version: 3.5
|
|
||||||
@include "scl.conf"
|
|
||||||
@include "`scl-root`/system/tty10.conf"
|
|
||||||
|
|
||||||
# First, set some global options.
|
# First, set some global options.
|
||||||
options {
|
options {
|
||||||
chain_hostnames(off);
|
chain_hostnames(0);
|
||||||
flush_lines(0);
|
flush_lines(0);
|
||||||
use_dns(no);
|
use_dns(1); # Search name with DNS of the machine
|
||||||
use_fqdn(no);
|
use_fqdn(1); # Use all FQDN name of the machine
|
||||||
owner("root");
|
|
||||||
group("adm");
|
|
||||||
perm(0640);
|
perm(0640);
|
||||||
stats_freq(0);
|
stats_freq(0);
|
||||||
bad_hostname("^gconfd$");
|
keep_hostname(0);
|
||||||
|
log_fifo_size (1000);
|
||||||
|
time_reopen (10);
|
||||||
|
create_dirs (no);
|
||||||
};
|
};
|
||||||
|
|
||||||
########################
|
|
||||||
# Sources
|
|
||||||
########################
|
|
||||||
source s_sys {
|
source s_sys {
|
||||||
system();
|
system();
|
||||||
internal();
|
internal();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
source s_net {
|
source s_net {
|
||||||
tcp(port(514) flags(syslog-protocol));
|
|
||||||
udp(port(514) flags(syslog-protocol));
|
udp(port(514) flags(syslog-protocol));
|
||||||
|
tcp(port(514) flags(syslog-protocol));
|
||||||
};
|
};
|
||||||
|
|
||||||
########################
|
|
||||||
# Destinations
|
|
||||||
########################
|
|
||||||
destination d_librenms {
|
destination d_librenms {
|
||||||
program("/opt/librenms/syslog.php" template ("$HOST||$FACILITY||$PRIORITY||$LEVEL||$TAG||$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC||$MSG||$PROGRAM\n") template-escape(yes));
|
program("/opt/librenms/syslog.php" template ("$HOST||$FACILITY||$PRIORITY||$LEVEL||$TAG||$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC||$MSG||$PROGRAM\n") template-escape(yes));
|
||||||
};
|
};
|
||||||
|
|
||||||
########################
|
|
||||||
# Log paths
|
|
||||||
########################
|
|
||||||
log {
|
log {
|
||||||
source(s_net);
|
source(s_net);
|
||||||
source(s_sys);
|
source(s_sys);
|
||||||
destination(d_librenms);
|
destination(d_librenms);
|
||||||
};
|
};
|
||||||
|
|
||||||
###
|
|
||||||
# Include all config files in /etc/syslog-ng/conf.d/
|
@include "/etc/syslog-ng/conf.d/"
|
||||||
###
|
|
||||||
@include "/etc/syslog-ng/conf.d/*.conf"
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Next start syslog-ng:
|
Next start syslog-ng:
|
||||||
@@ -75,12 +65,6 @@ Next start syslog-ng:
|
|||||||
service syslog-ng restart
|
service syslog-ng restart
|
||||||
```
|
```
|
||||||
|
|
||||||
Add the following to your LibreNMS config.php file to enable the Syslog extension:
|
|
||||||
|
|
||||||
```ssh
|
|
||||||
$config['enable_syslog'] = 1;
|
|
||||||
```
|
|
||||||
|
|
||||||
### Client configuration
|
### Client configuration
|
||||||
|
|
||||||
Below are sample configurations for a variety of clients. You should understand the config before using it as you may want to make some slight changes.
|
Below are sample configurations for a variety of clients. You should understand the config before using it as you may want to make some slight changes.
|
||||||
@@ -121,4 +105,4 @@ logging librenms.ip
|
|||||||
logging server librenms.ip 5 use-vrf default facility local6
|
logging server librenms.ip 5 use-vrf default facility local6
|
||||||
```
|
```
|
||||||
|
|
||||||
If you have permitted udp and tcp 514 through any firewall then that should be all you need. Logs should start appearing and displayed within the LibreNMS web UI.
|
If you have permitted udp and tcp 514 through any firewall then that should be all you need. Logs should start appearing and displayed within the LibreNMS web ui.
|
||||||
|
|||||||
Reference in New Issue
Block a user