SOLVED: Can someone spot the obvious error (because I c.....

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
adamnealis
Posts: 2
Joined: Sun Jan 22, 2006 10:38 am

SOLVED: Can someone spot the obvious error (because I c.....

Post by adamnealis »

To start to get the hang of cacti I've written a short perl script to simulate classic top(1) style CPU usage. And I want to graph the results.

I've got a slight problem. The fourth value "idle" is ignored by the poller.php job, as can be seem by the -t argument to rrdtool update below.

I'm convinced I've missed out a simple step, but I just cannot find out what!

If someone could point out my obvious error I'd be very grateful!

Thanks,
Adam.

Here's example perl script output:

sys:4.13163135099275 user:34.27011344309 wait:38.6717984087562 idle:22.9264567971611

Here's the corresponding line from cacti.log:

01/22/2006 03:50:01 PM - POLLER: Poller[0] CACTI2RRD: /usr/local/bin/rrdtool update /usr/local/share/cacti/rra/sys_22.rrd --template sys:user:wait 1137945000:60.310830602339:36.6894968275809:1.16954997910504

Here are the respective screens showing how this DS is configured and the perl script.
Attachments
GraphMan01.png
GraphMan01.png (126.45 KiB) Viewed 602 times
DataSources4.png
DataSources4.png (9.84 KiB) Viewed 602 times
DataSources2.png
DataSources2.png (9.75 KiB) Viewed 602 times
DataSources1.png
DataSources1.png (107.3 KiB) Viewed 602 times
cacti3.txt
(474 Bytes) Downloaded 77 times
Last edited by adamnealis on Sun Jan 22, 2006 12:27 pm, edited 1 time in total.
adamnealis
Posts: 2
Joined: Sun Jan 22, 2006 10:38 am

SOLVED: Can someone spot the obvious error (because I c.....

Post by adamnealis »

Don't know exactly what was wrong, but I first reordered the output fields in my script, and still the "idle" DS was ignored.

So I removed "idle" from the data input method.

This broke the graph management bit.

When I re-created the "idle" data source I noticed that cacti began to correctly collect user, sys, idle and wait.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please pay attention to print the output line as a single statement (no iterative prints) as the cacti poller will not wait if there might be another print if he's already got a first one ...
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests