On 8/30/07, Ryan Dooley <[EMAIL PROTECTED]> wrote: > > You can get monit to test remote services but it will only do a basic check > (tcp open sort of thing) but I have one host checking mysql, apache, ldap > and dns ports on other machines.
Nice concept, but it will work with network services only (it' works like telnet 1.2.3.5 3306 for example). But there are some issues: 1. you have to have access to the remote hosts from the monitoring machine (firewall access) 2. In case you can not access the remote servers (network is down or smth similar) from the machine you run monit you get an alert that the services are not running even though they are but you can not access the server If you want only to monitor the services (not to start, stop or restart) you can use a log parser that will parse monit.log and will send the messages to a remote host. Such a log parser can be found at http://www.moongate.ro/products/PHPLog/ It's really easy to configure it. It works as a deamon checks if there are changes to the log file and sends email alerts or executes a script. You can also check for a certain phrase in the log line that is added and to take some action. I'm using it to send SNMP traps whenever monit takes an action. I've added this lines to phplog.rules: from /var/log/monit.log watchfor /error/ exec "/usr/bin/sendtrap <%llne%>" watchfor /info/ exec "/usr/bin/sendtrap <%llne%>" Which means whenever a line is added to /var/log/monit.log and it contains words "error" or "info" exec the script <%line%> is a keyword that represents the line from the log file. The sendtrap script: has one snmptrap command HTH, Jovan -- To unsubscribe: http://lists.nongnu.org/mailman/listinfo/monit-general
