System Engineering

When Nagios send alert mails with attachement…

Posted on

When Nagios send alert mails with attachement… Perhaps this problem is that if a device name or warning message include non-Latin characters.   1. Add new command to nagios configuration Original commands # ‘notify-host-by-email’ command definition define command{ command_name notify-host-by-email command_line /usr/bin/printf “%b” “***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n” | /usr/bin/mail -s “** $NOTIFICATIONTYPE$ Host […]

System Engineering

Install Nagios on OpenSUSE 12.3

Posted on

1. Install requirements zypper install nagios nagios-plugins nagios-www nagiosgraph apache2 apache2-doc apache2-prefork 2. Prepare mysql CREATE USER nagios@localhost CREATE DATABASE nagios GRANT … 3. Configure ndo2db vi /etc/nagios/ndo2db.cfg lock_file=/var/run/nagios/ndo2db.pid db_user=nagios db_pass=PASSWORD chgrp nagios /var/spool/nagios chmod g+w /var/spool/nagios mkdir /var/run/nagios chown nagios:nagios /var/run/nagios cd /usr/share/doc/packages/ndoutils/db perl ./installdb -u nagios -h localhost -d nagios -p PASSWORD vi /etc/sysctl.conf […]