Send Test Syslog Message
I have test emails send daily, but what I failed to test was my syslog server. Now that I’ve had it brick on me, I’m now doing daily test syslog messages.
I use this PHP script. If you can’t happen to pull it from that site, here’s the file to download: syslog.zip (1225 downloads) .
I then use this simple PHP script to send the message:
1 2 3 4 5 | <?php require_once('/root/syslog-check/syslog.php'); $syslog = new Syslog(); $syslog->Send('1.1.1.1', 'syslog test message'); ?> |
I then have this setup to run as a cron job on my cacti server:
Last, I setup a match script in cacti’s syslog to match “syslog test message”. Simple enough 🙂