Bonjour,
j’utilise monit pour le monitoring des services, et je voudrais savoir s’il est possible de journaliser les
tests réguliers dans un fichier à part, par exemple dans /var/log/syslog au lieu de syslog ?
En lisant le manpage monit, j’ai laissé commenté dans le fichier /etc/monit/monitrc cette ligne :
# set logfile syslog facility log_daemon
Puis j’ai ajouté cette ligne :
set logfile /var/log/monit.log
Ensuite j’ai reloadé et restarté monit.
Cependant, malgrès cette manip, les tests réguliers sont toujours journalisé dans syslog au lieu de /var/log/monit.log:
...
Jan 2 12:10:24 ns dovecot: imap-login: Aborted login (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
Jan 2 12:10:24 ns dovecot: auth(default): new auth connection: pid=7102
Jan 2 12:11:01 ns /USR/SBIN/CRON[7121]: (root) CMD (/usr/local/rtm/bin/rtm 18 > /dev/null 2> /dev/null)
Jan 2 12:12:01 ns /USR/SBIN/CRON[7197]: (root) CMD (/usr/local/rtm/bin/rtm 18 > /dev/null 2> /dev/null)
Jan 2 12:12:24 ns postfix/smtpd[7248]: connect from localhost.localdomain[127.0.0.1]
Jan 2 12:12:24 ns dovecot: auth(default): new auth connection: pid=7248
Jan 2 12:12:24 ns postfix/smtpd[7248]: disconnect from localhost.localdomain[127.0.0.1]
Jan 2 12:12:24 ns dovecot: imap-login: Aborted login (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
Jan 2 12:12:24 ns dovecot: auth(default): new auth connection: pid=7250
Jan 2 12:13:01 ns /USR/SBIN/CRON[7268]: (root) CMD (/usr/local/rtm/bin/rtm 18 > /dev/null 2> /dev/null)
Jan 2 12:14:01 ns /USR/SBIN/CRON[7336]: (root) CMD (/usr/local/rtm/bin/rtm 18 > /dev/null 2> /dev/null)
Jan 2 12:14:24 ns postfix/smtpd[7386]: connect from localhost.localdomain[127.0.0.1]
Jan 2 12:14:24 ns dovecot: auth(default): new auth connection: pid=7386
Jan 2 12:14:24 ns postfix/smtpd[7386]: disconnect from localhost.localdomain[127.0.0.1]
Jan 2 12:14:24 ns dovecot: imap-login: Aborted login (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
Jan 2 12:14:24 ns dovecot: auth(default): new auth connection: pid=7388
Jan 2 12:15:01 ns /USR/SBIN/CRON[7406]: (root) CMD (/usr/local/rtm/bin/rtm 18 > /dev/null 2> /dev/null)
Jan 2 12:16:01 ns /USR/SBIN/CRON[7475]: (root) CMD (/usr/local/rtm/bin/rtm 18 > /dev/null 2> /dev/null)
Jan 2 12:16:24 ns postfix/smtpd[7525]: connect from localhost.localdomain[127.0.0.1]
Jan 2 12:16:24 ns dovecot: auth(default): new auth connection: pid=7525
Jan 2 12:16:24 ns postfix/smtpd[7525]: disconnect from localhost.localdomain[127.0.0.1]
Jan 2 12:16:24 ns dovecot: imap-login: Aborted login (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
Jan 2 12:16:24 ns dovecot: auth(default): new auth connection: pid=7527
...
Par contre, le fichier /var/log/monit.log a bien été crée et contient juste ceci :
[CET Jan 2 11:52:24] info : Starting monit daemon with http interface at [*:2812]
[CET Jan 2 11:52:24] info : Monit start delay set -- pause for 120s
[CET Jan 2 11:54:24] info : Starting monit HTTP server at [*:2812]
[CET Jan 2 11:54:24] info : monit HTTP server started
[CET Jan 2 11:54:24] info : 'ns.example.com' Monit started
=> Donc est-ce normal que les tests réguliers ne sont pas journalisés dans /var/log/monit.log ?
Merci d’avance, cordialement