Author Topic: Monitoring  (Read 24325 times)

dextaslab

  • Veteran
  • ***
  • Posts: 77
    • View Profile
    • modlog.net
Re: Monitoring
« Reply #15 on: September 05, 2011, 10:57:39 am »
I think we need to see this larger then only the server. I agree that if you just want a cpu graph, you can do it manually with hand-written scripts/files/...
But since linuxmce provides a lot more (dhpc, dns, proxy, firewalling...), we can take this up a higher level. If you put in tools like cacti, you can start monitoring your whole network/house. Think about all computers, switches, routers, power-meters... The key-element here is the user-friendly stuff. People need to be able to do it themselves, simple. With this, you gain that more people will use it, less people will ask you questions...
And it must be flexible...

LOL I see now, your looking for a magical do everything gui that records EVERYTHING you want with virtually no scripting/command prompt. Bwahahahahahah!!

The solution I provided (if you read the bash script) is generic, it'll work with ALL linuxmce systems (testing is needed) and if accepted by the Linuxmce gods, you do virutally nothing just install the package, and click on links in webadmin... It also does as you wanted; Intergrates into Linuxmce backend, looks through your database to finds how many MD's you have, and if they have HDD's it adds them to the graphing list.

"larger then only the server" - I wrote the script in about a day, and it is.
"And it must be flexible" - It is, I have a graph that shows downloaded weather reports and compares them with HDD temperatures.
"Think about all computers, switches, routers, power-meters" - it works with all snmp enabled devices, and those that you can generate scripted statistics. Again... written in about a day.

You've obivously just discovered cacti, and haven't had much experience using other related software... I have used most, and when your talking about flexibility and low overheads MRTG is better. I thought as a network engineer, you'd have used MRTG, as most larger networks do.

And with that I say "Your welcome", "Keep dreaming", and by all means prove me wrong with your working demo.

brononius

  • Guru
  • ****
  • Posts: 454
  • Trying to keep it simple and centralized...
    • View Profile
    • OnIrIa - linuxMCE blog
Re: Monitoring
« Reply #16 on: September 05, 2011, 11:27:05 am »
Positive reaction... 
Sorry if I'm dreaming for a better world of linuxmce.

I'll see how others react on this topic. And decide from their on if i'll keep on trying to promote this...


Little remark though: RRDtool is extracted from MRTG, and Cacti is based on RRDtool.
1+1=?





Version: linuxMCE 1404, running virtual on ESXi

Orbiters: ASUS eeePAD, Nexus 5, Huwai, web
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7912-7940-7960
Camera's: Foscam POE

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Monitoring
« Reply #17 on: September 05, 2011, 09:35:29 pm »
also have a look at the existing data logger plugin..
rock your home - http://www.agocontrol.com home automation

mkbrown69

  • Guru
  • ****
  • Posts: 213
    • View Profile
Re: Monitoring
« Reply #18 on: September 06, 2011, 04:04:35 am »
Not to throw gas on a fire, but here's an example of Cacti power graphs and temperature graphs feeding into Misterhouse home automation .  Marc's been around MH and Linux for a while...

http://marc.merlins.org/perso/linuxha/post_2010-08-13_Fine-grained-house-wide-power-monitoring-with-Brultech-ECM1240_-ecmread_py-_with-net-metering-support_-and-graphing-with-cacti.html

http://marc.merlins.org/perso/linuxha/post_2010-08-06_Temperature_-moisture_-humidity_-and-UV-monitoring-and-graphing-with-1wire-devices_-owfs_-and-cacti.html

As Hari suggests, you might want to check out the data logger functionality that's presently built-in to LMCE, and compare / contrast that against MRTG/Cacti.  It might be beneficial to have a requirements and capability analysis of the three, since logging and graphing can form a crucial part of the system and will likely have a data warehousing function for many people who want historical data for a reason.  I'm speaking as someone who's been using Misterhouse myself since 2004 to record internal house temperatures, and I have the RRD's to prove it!

I've used SAR, CollectD, nmon/topaz/ganglia, RRDtool with Perl, Tivoli, and so on...  There are lots of great tools out there; in this case, I think what's most important is that the logging, data warehousing, and graphing are all like Lego blocks.  Parts that can be re-used as common infrastructure consistently throughout the LMCE architecture.

My $0.02 CDN before HST...

/Mike

dextaslab

  • Veteran
  • ***
  • Posts: 77
    • View Profile
    • modlog.net
Re: Monitoring
« Reply #19 on: September 06, 2011, 03:32:02 pm »
also have a look at the existing data logger plugin..
LOL, yeah that could work :-P

I had a quick look through the source to try and work out how to use it, it there any online documentation on the arguments it takes, and how many variables can you pass to it? I could only work out it takes very specific events? would it take much to convert it (if it needs it) to accept:
<device_ID>,<data description>,<max value>,<alert issued at value><number of values>,<value>,<value>, etc...
Example:
<35>,<"Disk Usage">,<100%>,<95%>,<2>,<100%>,<43%>... Just an idea.

Basically I want to know if you can fake sensor output?



hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Monitoring
« Reply #20 on: September 07, 2011, 12:58:38 pm »
we can extend it to log additional events. We can add new events like "System health report"/whatever..
An event can have more than one parameter.

br Hari
rock your home - http://www.agocontrol.com home automation

brononius

  • Guru
  • ****
  • Posts: 454
  • Trying to keep it simple and centralized...
    • View Profile
    • OnIrIa - linuxMCE blog
Re: Monitoring
« Reply #21 on: January 09, 2012, 02:52:59 pm »
I finally had the time to create/install/configure a bit my monitoring.You can check it out on realtime: http://cacti.oniria.be. Login with linuxmce / lnxmc. For the moment, this is a limited user. Check out on the left the server part. Corius is the name of the server...
I'll see if I keep it like this or not (abuse, spam, hack...). I hope I can keep it open like this. At least for a while.
If you want more privilege to see it working, send me a pm...

For the moment, I just monitor some basic stuff of the server (bandwidth, disk space, load, database performance...).
I mainly use the cacti for network monitoring, power usage  of my home... And some alerting (tresholds) for some stuff (like to much power usage and so).

The plan is to add:
  • templates for the services (graphs)
  • templates for the asterik (graphs)
    once i started to configure my phones in there
  • up/down status for services (manage)
    dns/proxy/dhcp/samba/web...
  • logging module (syslog)
  • Create a weathermap
    Graphical scheme with status
  • ...

Let me know if you think of interesting things...
You never know what the result can be...



ps of course this is running on the same machine as linuxmce...  ;D
« Last Edit: January 09, 2012, 03:19:45 pm by brononi »
Version: linuxMCE 1404, running virtual on ESXi

Orbiters: ASUS eeePAD, Nexus 5, Huwai, web
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7912-7940-7960
Camera's: Foscam POE

bongowongo

  • wants to work for LinuxMCE
  • **
  • Posts: 826
    • View Profile
Re: Monitoring
« Reply #22 on: January 09, 2012, 05:00:22 pm »
I finally had the time to create/install/configure a bit my monitoring.You can check it out on realtime: http://cacti.oniria.be. Login with linuxmce / lnxmc. For the moment, this is a limited user. Check out on the left the server part. Corius is the name of the server...
I'll see if I keep it like this or not (abuse, spam, hack...). I hope I can keep it open like this. At least for a while.
If you want more privilege to see it working, send me a pm...

For the moment, I just monitor some basic stuff of the server (bandwidth, disk space, load, database performance...).
I mainly use the cacti for network monitoring, power usage  of my home... And some alerting (tresholds) for some stuff (like to much power usage and so).

The plan is to add:
  • templates for the services (graphs)
  • templates for the asterik (graphs)
    once i started to configure my phones in there
  • up/down status for services (manage)
    dns/proxy/dhcp/samba/web...
  • logging module (syslog)
  • Create a weathermap
    Graphical scheme with status
  • ...

Let me know if you think of interesting things...
You never know what the result can be...



ps of course this is running on the same machine as linuxmce...  ;D

Very cool, do you have a wiki how to implement this?

brononius

  • Guru
  • ****
  • Posts: 454
  • Trying to keep it simple and centralized...
    • View Profile
    • OnIrIa - linuxMCE blog
Re: Monitoring
« Reply #23 on: January 09, 2012, 05:12:51 pm »
Very cool, do you have a wiki how to implement this?

Not directly. But once i see what the rest thinks about it, I'll write one. I first want to see what we need/want. And then I want to see if it's possible to create a kind of template of it all. This way, people don't have to 'understand' this module, they just can use/view it...
Add it, log it, check it... And be alerted if something is wrong.


ps but in the meantime, it's really easy to install/use cacti. Just try a 'sudo apt-get install cacti' and you should be on your way.
« Last Edit: January 09, 2012, 05:16:11 pm by brononi »
Version: linuxMCE 1404, running virtual on ESXi

Orbiters: ASUS eeePAD, Nexus 5, Huwai, web
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7912-7940-7960
Camera's: Foscam POE

bongowongo

  • wants to work for LinuxMCE
  • **
  • Posts: 826
    • View Profile
Re: Monitoring
« Reply #24 on: January 09, 2012, 07:18:07 pm »
Not directly. But once i see what the rest thinks about it, I'll write one. I first want to see what we need/want. And then I want to see if it's possible to create a kind of template of it all. This way, people don't have to 'understand' this module, they just can use/view it...
Add it, log it, check it... And be alerted if something is wrong.


ps but in the meantime, it's really easy to install/use cacti. Just try a 'sudo apt-get install cacti' and you should be on your way.

Yes that is me, I am your target user :)
I have very little time to test now, if I find time I will do, but I want to put all my time in the wiki and some snapshots (ahum possy ;) )

brononius

  • Guru
  • ****
  • Posts: 454
  • Trying to keep it simple and centralized...
    • View Profile
    • OnIrIa - linuxMCE blog
Re: Monitoring
« Reply #25 on: January 13, 2012, 02:15:52 pm »
Small example of the syslog module: http://forum.linuxmce.org/index.php/topic,12292.0.html
A pitty i can't give you limit access to it like for the graphs.
Version: linuxMCE 1404, running virtual on ESXi

Orbiters: ASUS eeePAD, Nexus 5, Huwai, web
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7912-7940-7960
Camera's: Foscam POE

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Monitoring
« Reply #26 on: January 19, 2012, 04:22:44 am »
guys...guys...guys...

Please actually take a look at the system we have.

Let it soak in, WE HAVE A DISTRIBUTED MESSAGING SYSTEM, WHICH CAN NOT ONLY SEND COMMANDS, BUT EMIT AND CONSUME __EVENTS__ ... THIS IS HOW THE DATA LOGGER WORKS!

The data logger can be extended to intercept any events defined in the database via the web admin, along with their parameters. This isn't complicated, it just takes a little of ACTUALLY UNDERSTANDING THE SYSTEM, INSTEAD OF WRITING AROUND IT!

But if you're too impatient:

(1) create the events you want
(2) use MessageSend to synthesize those events from outside if you wish, or write a DCE device to emit them.
(3) extend the Data Logger plugin to intercept and consume those events.

Come on guys, seriously. ;)
-Thom

brononius

  • Guru
  • ****
  • Posts: 454
  • Trying to keep it simple and centralized...
    • View Profile
    • OnIrIa - linuxMCE blog
Re: Monitoring
« Reply #27 on: January 19, 2012, 07:35:00 am »
I'm not sure that i understand what you're saying here.
You mean that you've got a syslog server already in place?
Is there somewhere a wiki about this? The most part i'm interested in, is the ease to view it. The GUI to say it like that...


ps I'm not trying to implement "other" things. I'm just a big fan of the cacti architecture because it's really fast, complete monitoring/alerting tool, and above all: it's awonderful and  'idiot prove' GUI... And this last part has been proven several times in my professional live... :P
Monitoring presence, graph bandwidth-load-..., alerting, nicely view all your logs, weathermaps, inventory your network... With all this,  it's just your imagination that blocks you... So it's not only the log module, it's the combination of it all...
Fe i receive a mail once my power usuage is going above 5000W, or a mail is send out once my HD is about 75% full. And all this without scripting (or at least without the knowledge of scripting)...
For me, it's just a big + to have something like this added to 'my' central server that already controls everything...
Send me a PM if you want to log in to my server with a bit more user credentials. So you can see what else we (=linuxmce users) could do with this tool...
Version: linuxMCE 1404, running virtual on ESXi

Orbiters: ASUS eeePAD, Nexus 5, Huwai, web
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7912-7940-7960
Camera's: Foscam POE

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Monitoring
« Reply #28 on: January 19, 2012, 07:44:02 am »
you can take, create events that you wish to monitor, alter monitoring software to emit those events either via MessageSend, OR via a custom DCE device, then alter the Data Logger plugin to consume those events and put them in the database, so that the UI in the web admin can use them?

-Thom
« Last Edit: January 19, 2012, 07:50:44 am by tschak909 »

mkbrown69

  • Guru
  • ****
  • Posts: 213
    • View Profile
Re: Monitoring
« Reply #29 on: January 23, 2012, 02:07:40 am »
Brononi,

What I think Thom is getting at is that if you're going to champion Cacti integration, you'll have to extend Cacti a bit to send DCE events, so that DataLogger can record them, and the rest of LMCE can act on them.  So, instead of Cacti sending an e-mail or SMS when a threshold is exceeded, it would use MessageSend to emit an LMCE event which Datalogger would record, and that the system could act on if a scenario was defined.  Like so...

Power usage goes over 5kw, Cacti generates a MessageSend to LMCE, Datalogger records the threshold exceeded event, and an "excessive power use" scenario is triggered, which broadcasts a message to all orbitors, and a "chi-Ching" sound is played over all audio devices.

So, it means some work extending Cacti, some work extending Datalogger, and some work figuring out events.  Plus, doing all that in such a way that someone else can extend your work to graph other things (soil moisture readings, humidity, Squid proxy results for domains, etc).  It would also probably involve integrating Cacti's web GUI into the LMCE web GUI, and use LMCE defined users.

I agree with you that Cacti and rrd's are great for recording some types of data, like multiple temperature sensors.  Assuming OWFS as a sensing infrastructure, it samples by default every 10 seconds per sensor.  So, that works out to 8640 samples per sensor per day.  Over time, those samples can be averaged because the further away they are from the present, the less need there is for precision (which is what RRD's do).   Cacti is also great at dealing with all the noise that syslog can generate.  Same with other types of repetitively sampled data, where the need for precision becomes less important over time.

Where I think Datalogger integration could really shine is for correlating events from multiple subsystems into a "timeline of events".  It's the concept of federated data; one overseer of other more specialized reporting/monitoring systems. It could be useful for debugging complex scenerios (this motion event triggered that lighting event when this other condition existed) as well as for security auditing (think alarm system event log), telephony logging, MythTV events, etc.  It would be especially nice if the Datalogger events could be viewed from an orbitor.  What would be really cool is heuristics to mine the Datalogger for patterns.  Think a "vacation mode" which operates lights based on the inhabitants past behaviours.

Just my $0.02 CDN as someone who's presently dealing with Federating configuration and compliance management systems at work (in addition to other things).

/Mike