There's also a service running on crontab to run all probes each minute and update the database. After that you can see the status (last year, month and day's) and also create the graphics.
This tool uses MySQL to store all structured data, logs and current status of all probes, uses PHP to create the interface and provide the classes to manipulate data and uses MRTG to generate the nice graphics from a probe's log.
To change the company name and contact just type it on it's respectives text fields at the top of the page and click on "Update".
Editing a company you'll see a list of probes and hosts. To create a host simply type it's fully qualified name on the first text field on hosts list and click on "Create Host". The second text field is it's IP but, if the name is on DNS you can leave it empty that Yamoon will try to find it for you.
Note that when updating a Host, when you erase it's IP Yamoon will force to find another IP for it. In other words, Yamoon will try hard to not let a host without IPs. That's a good feature to reload a host's IP when DNS has changed.
As soon as you have hosts you can start creating probes for them. On the probes list select a service and a host and click on "Create Probe". You can create as many distinct probes as you want.
You can activate and deactivate probes by editing them and selecting it's status accordingly and clicking on "Update" button.
At the edit probe and hosts you can change all parameters but Yamoon will clear all probe's logs and reload all MRTG configurations for that company if you change it's service and/or host for obvious reasons.
The color of each probe's line is defined by its status. If the probe is UP, its color is green, otherwise it's red.
There are two actions to be taken for each probe: Status, which shows you what's the service level (SLA) for that particular probe on the last day, month and year, and MRTG, which shows you the three graphics for that probe: status, quality and delay.
If you click on the MRTG link and there's a 404 error page you must first assure all company's MRTG configuration are up-to-date by clicking on "Reload graphics config" link at edit page and than "Reload graphics" on the view page to generate all MRTG graphics.
Each probe is set to run once in a minute but you can click on the "Run now" link to force all probe's execution and see its status based on fresh data.
Each service is associated with a language so if you need a language for your service that don't exist yet, create it. To create a language is simple, just click on the "new" link of the languages' list and enter it's name and binary path. If you don't provide the binary path, Yamoon will try to find it based on the command name (like 'perl' or 'bash').
To create a service you'll need a language ('sh' is the default and set to "/bin/sh -c"). When you have your prefered language you may write the code that will test the service on the "code" text area. This script must test the service and return some success/error code to both Result and Quality regular expressions parse it.
When your service is 'network' the code may be something like "ping -c 1 $HOST". It'll return a lines like this:
1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.065/0.065/0.065/0.000 msThe "Result" regular expression should get if the packet was received, so it should be:
1 receivedThis way, if no packet was received, the regex will not match and the status is DOWN or if it matches, the status is UP.
For the quality regex it's a little more complicated, your regex should return a value using parenthesis "(" ")" around the number on the command's response that will represent the service's quality. On our case, the regular expression:
\s\d{1,3}\.\d{3}\/(\d{1,3}\.\d{3})\/will get the first two numbers on the second line that represents the minimum time and average time of the ping packet (on our case the same number since there's only one packet. Note the parentesis around the second number:
(\d{1,3}\.\d{3})it'll return that number, which in our case is the average time. This denotes the quality of the link on network services, the latency of the network between our local host and the remote host.
Creating services is not a simple thing and involves several tests before it's fully functional. The idea is to run it from the console until it's done and then port it as a Yamoon's service.
Note that Yamoon will run the command line folowed by your code so to run a perl code you must set the command line path to something like:
/usr/bin/perl -eSo, when Yamoon calls the system on [$cmd "$code 2>&1"] it'll execute the perl code correctly. The same way, PHP must be called as "php -q" to avoid HTTP headers, Bash need the "-c" option to run the script within double quotes and so on. Discover the best command line for your prefered programming language.
Also note that Yamoon always redirects the stderr (standard error) to the stdout (standard output) using "2>&1" at the end of the system call so you can also use it to status and quality regex as well.