LinHES Forums
http://forum.linhes.org/

Web-Based Myth Health Monitoring
http://forum.linhes.org/viewtopic.php?f=6&t=10805
Page 1 of 1

Author:  md10md [ Thu Jul 13, 2006 7:53 am ]
Post subject:  Web-Based Myth Health Monitoring

From time to time I like to be able to check if my KnoppMyth box is running smoothly and I take a look at the SMART logs or check out mbmon. But, is there any program that exists that consolidates all this info on a webpage that could be accessed through MythWeb or similar. Something that would be customizable and show warnings plus system information such as disk space remaining and system temperature? Any help would be appreciated finding something like this.

Author:  adoute [ Thu Jul 13, 2006 8:53 am ]
Post subject: 

A web page that combined that type of information sounds like a great idea. I have a cron job running on one of my other machines that combines health & status information as you've described from both my Myth boxes, and a couple other key systems into an e-mail and sends it to me every morning.

I know I won't have much free time in the next week or two, but I'm interested in creating a web based version of the report that gets emailed to me.

The things I already include are:
- output of grepping syslogs for nvrm (I have some issues with Nvidia drivers)
- output of grepping syslogs for UPS (just to see if the power has gone flaky)
- output of df -h
- SMART temp data from each HD that supports it
- mbmon info (stripped to just temps & fan speeds)
- parts of the 'Status' page from MythWeb
- comparison of the number of recorded programs in the db vs the number stored on the hd (easy to spot orphans & other issues)
- Current status details on each systems UPS

Is there anything else that you'd like to add? I won't be able to work on this much in the next week or two, but I do plan on working on this.

Allan

Author:  md10md [ Thu Jul 13, 2006 9:09 am ]
Post subject: 

Awesome! Those are some useful additions. Maybe number of inodes left on the myth partition. KnoppMyth seems to allocate a small number and they always run out quickly. I can't really think of anything else at the moment but since everyone's systems are a little bit different, is it possible to provide a config file where you could change some basic options? Good luck and hope to see this soon.

Author:  mad_paddler [ Thu Jul 13, 2006 10:14 am ]
Post subject: 

I have a simple cgi script I use to monitor my system, simply:

Copy the code into /usr/lib/cgi-bin/monitor.cgi
chmod 755 /usr/lib/cgi-bin/monitor.cgi
open a web browser and point it at http://<ipofmythmachine>/cgi-bin/monitor.cgi

You should be able to easily modify it to your needs :)

Code:
#!/usr/bin/perl
# Simple monitoring script
#

$output = `/usr/bin/mbmon -c1`;
$output2 = `df -h`;
$output3 = `df -i`;

print "Content-type: text/html\n\n";
print "<html>\n\n";
print "<head>\n";
print "<title>Simple CPU temp script</title>\n";
print "</head>\n\n";
print "<body>\n";

print "<pre>$output</pre>\n";
print "<pre>$output2</pre>\n";
print "<pre>$output3</pre>\n";

print "</body>\n";
print "</html>\n";

Author:  md10md [ Thu Jul 13, 2006 10:23 am ]
Post subject: 

For some reason that doesn't work for me. I have aviman as well in the cgi-bin directory symlinked and it works fine but the monitor.cgi (or .pl) does not work. It just never opens. Any ideas?

Edit: I restarted apache and now it opens up the file as though it is trying to save it instead of as a webpage. This is firefox BTW.

Author:  mad_paddler [ Thu Jul 13, 2006 10:56 am ]
Post subject: 

Did you chmod 755 the file?

Author:  md10md [ Thu Jul 13, 2006 10:59 am ]
Post subject: 

Yup, the only thing I can tell that is different between the monitor.cgi and the aviman.pl file is that the group and owner of the monitor.cgi is "root" and the aviman.pl is "www-data".

Author:  mad_paddler [ Thu Jul 13, 2006 12:03 pm ]
Post subject: 

the owner and group is set to root on mine too, no idea why it isnt working on yours :S I don't remember making any changes to apache or anything! What version of knoppmyth are you using?

Author:  md10md [ Thu Jul 13, 2006 3:52 pm ]
Post subject: 

Just R5C7.

Author:  electrohacker [ Thu Jul 13, 2006 6:43 pm ]
Post subject: 

why dont qwe create a plugin or extend the current web plugin to include this info, I too am getting concerned about temperatures as today it went over 90 F and I know my main win PC went over 55C

Author:  mad_paddler [ Fri Jul 14, 2006 4:05 am ]
Post subject: 

Both my knoppmyth boxes are R5C7, one of them completely unmodified. The cgi script works fine on both :/

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/