Need Cacti graphs on remotehosts...not only localhost

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
psyllex
Posts: 5
Joined: Thu Jan 10, 2013 5:58 pm

Need Cacti graphs on remotehosts...not only localhost

Post by psyllex »

I just installed cacti and I got it up and running monitoring my local host. I have a plugin I built for measuring bandwidth levels. That doesn't show up any where in Cacti that I've noticed. But it does show up in nagios as service that is being monitored. I also have 3 remote machines that I'm monitoring. Again I have those set up on Nagios and they are being monitored. But I can't get to the 'option' of using them on cacti. I'm not sure if I didn't configuration something right or what. But I'd like to be able to see my custom plugins and my remote hosts. Can anyone help me out please? Thanks a lot!
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Need Cacti graphs on remotehosts...not only localhost

Post by gandalf »

A plugin to be used for Cacti must be designed for it (please note, that "plugin" means different things for nagios and for Cacti!)

For the hosts: please pick one and tell us how you've set it up, which graphs have been created and what the debugging guide shows you (see: 2nd link of my sig)
R.
psyllex
Posts: 5
Joined: Thu Jan 10, 2013 5:58 pm

Re: Need Cacti graphs on remotehosts...not only localhost

Post by psyllex »

gandalf wrote:A plugin to be used for Cacti must be designed for it (please note, that "plugin" means different things for nagios and for Cacti!)

For the hosts: please pick one and tell us how you've set it up, which graphs have been created and what the debugging guide shows you (see: 2nd link of my sig)
R.
Alright I understand about the plugin. But isn't Cacti able to pickup the hosts that I'm monitoring off Nagios's .cfg file? Because they are in there I've defined the commands, hosts, and services. From my understand of the documentation....it should just seemlessly run in Cacti.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Need Cacti graphs on remotehosts...not only localhost

Post by gandalf »

psyllex wrote:But isn't Cacti able to pickup the hosts that I'm monitoring off Nagios's .cfg file?
No. The nagios world and the Cacti world are not interconnected. Yes, there have been Cacti plugins to join them, but personally I did not yet use them.
R.
psyllex
Posts: 5
Joined: Thu Jan 10, 2013 5:58 pm

Re: Need Cacti graphs on remotehosts...not only localhost

Post by psyllex »

Ok. I appreciate the response. Do you know if Cacti can run fast? For example could I use it to monitor bandwidth in realtime?
SimonH2
Posts: 14
Joined: Tue Jan 15, 2013 10:09 am

Re: Need Cacti graphs on remotehosts...not only localhost

Post by SimonH2 »

How fast is "fast" ?

I'm just getting started with Cacti, and the first graph I've been working on is near-realtime traffic data. I'm not using Cacti's inbuilt poller as I already had data collection set up for my hand-rolled RRD graphs, but I'm just about to post again about that as I'm using RRDcached for the collection.
On my "logger" I run RRDcached, and on the remote machines I use a customer script that sends data to cached every 2 seconds (step is set to 5s for the RRD file).

I just need to figure out how to get Cacti to add "--daemon unix:/var/run/rrdcached.sock" to the RRDtool options - otherwise the data can be up to 5 minutes out of date. I've tried a wrapper script - but that loses quotes and messes up if a string contains spaces. Changing the Cacti setting for the path to the binary doesn't work as that puts the extra bit before the command.
psyllex
Posts: 5
Joined: Thu Jan 10, 2013 5:58 pm

Re: Need Cacti graphs on remotehosts...not only localhost

Post by psyllex »

SimonH2 wrote:How fast is "fast" ?

I'm just getting started with Cacti, and the first graph I've been working on is near-realtime traffic data. I'm not using Cacti's inbuilt poller as I already had data collection set up for my hand-rolled RRD graphs, but I'm just about to post again about that as I'm using RRDcached for the collection.
On my "logger" I run RRDcached, and on the remote machines I use a customer script that sends data to cached every 2 seconds (step is set to 5s for the RRD file).

I just need to figure out how to get Cacti to add "--daemon unix:/var/run/rrdcached.sock" to the RRDtool options - otherwise the data can be up to 5 minutes out of date. I've tried a wrapper script - but that loses quotes and messes up if a string contains spaces. Changing the Cacti setting for the path to the binary doesn't work as that puts the extra bit before the command.

I'm talking about polling every 100 ms. There are command line tools that will do it like Speedometer. But it looks like Atari 2600 graphics. Darkstat is at least 1/sec and looks a little better I assume the speed is somewhat dictated by the fact it is a web page and those there's a bit of latency due to running through Apache Server then displaying out to the browser from there. But both are pretty good I just haven't found anything that runs in real time with relatively 'pretty' graphics.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Need Cacti graphs on remotehosts...not only localhost

Post by gandalf »

psyllex wrote:I'm talking about polling every 100 ms.
I don't say that this won't work. IMHO, it has not yet been tried, at least to my knowledge. I know, that there has been a discussion about sub-second rrd updates, but I don't remember the outcome. I'm quite sure, that Cacti currently is not able to do sub-second polling.
And I'm quite sure, that the starting overhead alone for the spine poller prevents us from doing so.

Assuming you want to fetch SNMP data, please know that snmp agents usually use caching to improve performance. E.g. on most Linux system, snmpd will cache traffic information for about 15 sec. That is: for 15 sec you always will retrieve the same data. I do not know whether different data sources act like this.

So odds are, that you won't be satisfied ...
R.
psyllex
Posts: 5
Joined: Thu Jan 10, 2013 5:58 pm

Re: Need Cacti graphs on remotehosts...not only localhost

Post by psyllex »

Well thanks for the information. I've founds some terminal scripts that effectively do what I want. Speedometer being the fastest. I currently have it set to intervals of .6sec. And it does fine. Darkstat works at least at 1/sec as well. It just would've been nice to after the reporting that Cacti provides as well. I may still configure it for that, but I'm not network/systems admin so this might be a stretch for me. Something like Netflow Analyzer works for me...where I just configure it to the switch and it sucks in all nodes and reports on them for me. But we shall see....Cacti is definitely on my list of things to learn and perhaps I could create a plugin for it that does do real time polling.
SimonH2
Posts: 14
Joined: Tue Jan 15, 2013 10:09 am

Re: Need Cacti graphs on remotehosts...not only localhost

Post by SimonH2 »

Still a Cacti noob, but my feeling is that it's not really the right tool for the job. Also, there are several different aspects to the task.

RRDtool will quite happily handle sub-second updates, but I think you'd need to be writing your own collection scripts. Trying to capture at 100ms resolution will incur considerable overheads. As Gandalf says, the overhead from Cacti firing up it's collection process would probably preclude doing it that way. That's not to say there's anything wrong with Cacti - it's just one of those tradeoffs you make between something dedicated to a single task and something that can flexibly handle a range of tasks.
If the system on which you are collecting stats is different to where you are processing them, then look into rrdcached - it a) makes transferring the data fairly easy, and b) does caching which will reduce disk I/O (especially at the high update rates you are talking about. It can also handle local caching at the source if the destination is offline - so having the destination down doesn't automatically mean lost data.

You then need to display the data. If you are happy to "click something and get a snapshot" then Cacti is fine. If you want a realtime updating display (ie a moving chart with live data) then I'd say that a web based system isn't the right tool, and neither is RRD.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests