xspoon
08-30-2007, 01:21 PM
salut,
je met à dispo ce plug qui teste les messages et les etats de la base mysql syslog-NG
dans une prochaine version je modifierai le plug pour pouvoir le placer sous un host particulier et n'avertir que pour ce host. En l'etat c'est un plugin et qui est à placer en check sous le host nagios lui même.
exemple de conf:
Commande:$USER1$/check_syslog-ng_db.pl -w $ARG1$ -c $ARG2$
Arguments: !err,warn!alert,crit,emerg
editer le plug pour renseigner les parametres de connection ligne 59:
my $db_host='localhost';
my $db_name='syslog';
my $db_user='sysloguser';
my $db_passwd='sysloguser';
/libexec# ./check_syslog-ng_db.pl --help
Plugin for Nagios
searches for any strings in the priority (default) or text field of the syslog-ng messages.
Hint: edit the plugin to properly connect to your database.
Hint: if necessary, do a 'chown nagios.nagios' to /tmp/syslog.localhost.syslog.tmp.
Hint: also, set 'max_check_attempts' to 1 in the nagios service definition.
Usage:
-w (--warning) strings to look for (Example: S1,"S 2",S3)
-c (--critical) idem, but sets a critical state.
-t (--text) search for matches in the text of the message instead (default is `priority`)
-s (--show) search the entire history of messages (debug/info only).
-m (--multi-line) for command line display and/or Nagios 3.0 multi-line text output
-h (--help) usage help
je met à dispo ce plug qui teste les messages et les etats de la base mysql syslog-NG
dans une prochaine version je modifierai le plug pour pouvoir le placer sous un host particulier et n'avertir que pour ce host. En l'etat c'est un plugin et qui est à placer en check sous le host nagios lui même.
exemple de conf:
Commande:$USER1$/check_syslog-ng_db.pl -w $ARG1$ -c $ARG2$
Arguments: !err,warn!alert,crit,emerg
editer le plug pour renseigner les parametres de connection ligne 59:
my $db_host='localhost';
my $db_name='syslog';
my $db_user='sysloguser';
my $db_passwd='sysloguser';
/libexec# ./check_syslog-ng_db.pl --help
Plugin for Nagios
searches for any strings in the priority (default) or text field of the syslog-ng messages.
Hint: edit the plugin to properly connect to your database.
Hint: if necessary, do a 'chown nagios.nagios' to /tmp/syslog.localhost.syslog.tmp.
Hint: also, set 'max_check_attempts' to 1 in the nagios service definition.
Usage:
-w (--warning) strings to look for (Example: S1,"S 2",S3)
-c (--critical) idem, but sets a critical state.
-t (--text) search for matches in the text of the message instead (default is `priority`)
-s (--show) search the entire history of messages (debug/info only).
-m (--multi-line) for command line display and/or Nagios 3.0 multi-line text output
-h (--help) usage help