Instructions for configuring Syslog.conf/Syslog-ng.conf
Forwarding Syslog messages from UNIX/Linux Devices
- Log on to the target device (as a super user).
- Open /etc/syslog.conf file with an editor (e.g VI).
- Enter *.debug and press the Tab key. then enter the host name or IP address of the Zenoss server. See example below:
*.debug @192.168.X.X
- Save the file and exit the file editor program.
- Restart the Syslog service using the command below:
/etc.init.d/syslog restart
Forwarding Syslog Messages from a Cisco IOS Router
- Log on to the target router.
- Type the command enable at the prompt.
- Once you are prompted for a password, enter the correct password.
- Type the command config at the prompt.
- Type the command terminal at the configuration prompt.
- At the prompt, Set the Syslog forwarding mechanism. See example below:
logging <IP address of the Zenoss server>
- Exit out all the prompts to the main router prompt.
Forwarding Syslog Messages from a Cisco CatOS Switch
- Log on to the target switch.
- Type the command enable at the prompt.
- Once you are prompted for a password, enter the correct password.
- Set the Syslog forwarding mechanism. See example below:
set logging server <IP address of the Zenoss server>
- You can set the types of logging information that you want the switch to provide with the commands below as examples:
set logging level mgmt 7 default
set logging level sys 7 default
set logging level filesys 7 default
Forwarding Syslog Messages using Syslog-ng
Here is an example for FreeBSD and Linux platforms.
- Log on to the target device (as a super user)
- Open /etc/syslog-ng/syslog-ng.conf file with an editor (e.g VI).
- Add source information to file. See example below:
FreeBSD:
source src { unix-dgram("/var/run/log"); internal ();};
Linux: (will gather both system and kernel logs)
source src {
internal();
unix-stream("/dev/log" keep-alive(yes) max-connections(100));
pipe("/proc/kmsg");
udp();
};
- Add destination information (in this case, the Zenoss server). See example below:
destination zenoss {udp("yourzenossserver.com" port(1514));};
- Set your log statements to send local logs to your Zenoss server. See example below:
log { source(src); destination(zenoss); };