Forum

Munin plugin

niko2
21 March 2010, 01:14
I would like to write a munin plugin for hiawatha.
Is there some real-time information easily readable to suit my need ?
Like a "apache server-status" ?

Hiawatha version: 7
Operating System: Debian Lenny
Hugo Leisink
21 March 2010, 18:51
You could check out monitor.c to see what I did to gather information for the Hiawatha Monitor.
niko2
23 March 2010, 21:20
OK
Sorry if I don't understand how monitor is working but I don't find which http request is sent to hiawatha to gather information

I read libraries/http.php and then I tried

echo "GET / HTTP/1.0\r\nHost:monitor\r\nAccept-Encoding: gzip\r\nUser-Agent: Mozilla/5.0 (compatible; Banshee HTTP class)\n\n" | netcat localhost 80

Hugo Leisink
23 March 2010, 21:51
If monitoring is enabled in Hiawatha, it will write log information to logfiles. The Hiawatha Monitor website will periodical gather this log information via a cronjob. This cronjob script does normal HTTP requests to the Hiawatha webserver it monitors to retrieve the information.
niko2
23 March 2010, 22:21
This is what I have understood.
But I don't know to execute the "normal HTTP requests to the Hiawatha webserver it monitors to retrieve the information" using netcat.
What is wrong in my request ?
Hugo Leisink
23 March 2010, 22:41
The Hiawatha webserver with Monitor enabled, will only accept requests for the monitor virtual host from the IP address of the monitoring server.
This topic has been closed.