No localhost graphs on new install

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

Moderators: Developers, Moderators

dunxd
Posts: 18
Joined: Wed Sep 23, 2009 5:51 am
Location: London, UK

No localhost graphs on new install

Post by dunxd »

I installed Cacti yesterday, and have found that the default checks on localhost (I haven't added anything else yet) do not appear to work.

The graphs appear, but with no lines, and all the values showing as NaN.

Here is the debug output for a single poller pass:

Code: Select all

09/23/2009 12:00:02 PM - SYSTEM STATS: Time:1.2426 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:5
09/23/2009 12:00:02 PM - POLLER: Poller[0] CACTI2RRD: /usr/local/groundwork/common/bin/rrdtool update /usr/local/groundwork/apache2/htdocs/cacti-0.8.7e/rra/localhost_mem_buffers_3.rrd --template mem_buffers 1253703601:U
09/23/2009 12:00:02 PM - POLLER: Poller[0] CACTI2RRD: /usr/local/groundwork/common/bin/rrdtool update /usr/local/groundwork/apache2/htdocs/cacti-0.8.7e/rra/localhost_mem_swap_4.rrd --template mem_swap 1253703601:U
09/23/2009 12:00:02 PM - POLLER: Poller[0] CACTI2RRD: /usr/local/groundwork/common/bin/rrdtool update /usr/local/groundwork/apache2/htdocs/cacti-0.8.7e/rra/localhost_load_1min_5.rrd --template 1253703601:U
09/23/2009 12:00:02 PM - POLLER: Poller[0] CACTI2RRD: /usr/local/groundwork/common/bin/rrdtool update /usr/local/groundwork/apache2/htdocs/cacti-0.8.7e/rra/localhost_users_6.rrd --template users 1253703601:U
09/23/2009 12:00:02 PM - POLLER: Poller[0] CACTI2RRD: /usr/local/groundwork/common/bin/rrdtool update /usr/local/groundwork/apache2/htdocs/cacti-0.8.7e/rra/localhost_proc_7.rrd --template proc 1253703601:U
09/23/2009 12:00:02 PM - CMDPHP: Poller[0] Time: 0.0418 s, Theads: N/A, Hosts: 1
09/23/2009 12:00:02 PM - CMDPHP: Poller[0] Host[1] DS[7] CMD: perl /usr/local/groundwork/apache2/htdocs/cacti-0.8.7e/scripts/unix_processes.pl, output: U
09/23/2009 12:00:02 PM - CMDPHP: Poller[0] Host[1] DS[7] WARNING: Result from CMD not valid. Partial Result: U
09/23/2009 12:00:02 PM - CMDPHP: Poller[0] Host[1] DS[6] CMD: perl /usr/local/groundwork/apache2/htdocs/cacti-0.8.7e/scripts/unix_users.pl , output: U
09/23/2009 12:00:02 PM - CMDPHP: Poller[0] Host[1] DS[6] WARNING: Result from CMD not valid. Partial Result: U
09/23/2009 12:00:02 PM - CMDPHP: Poller[0] Host[1] DS[5] CMD: perl /usr/local/groundwork/apache2/htdocs/cacti-0.8.7e/scripts/loadavg_multi.pl, output: U
09/23/2009 12:00:02 PM - CMDPHP: Poller[0] Host[1] DS[5] WARNING: Result from CMD not valid. Partial Result: U
09/23/2009 12:00:02 PM - CMDPHP: Poller[0] Host[1] DS[4] CMD: perl /usr/local/groundwork/apache2/htdocs/cacti-0.8.7e/scripts/linux_memory.pl SwapFree:, output: U
09/23/2009 12:00:02 PM - CMDPHP: Poller[0] Host[1] DS[4] WARNING: Result from CMD not valid. Partial Result: U
09/23/2009 12:00:01 PM - CMDPHP: Poller[0] Host[1] DS[3] CMD: perl /usr/local/groundwork/apache2/htdocs/cacti-0.8.7e/scripts/linux_memory.pl MemFree:, output: U
09/23/2009 12:00:01 PM - CMDPHP: Poller[0] Host[1] DS[3] WARNING: Result from CMD not valid. Partial Result: U
09/23/2009 12:00:01 PM - CMDPHP: Poller[0] Host[1] PING: Ping not performed due to setting.
09/23/2009 12:00:01 PM - POLLER: Poller[0] WARNING: Poller[0] Host[1] Ping Time was not numeric
09/23/2009 12:00:01 PM - CMDPHP: Poller[0] WARNING: sockets support not enabled in PHP, falling back to SNMP ping
09/23/2009 12:00:01 PM - POLLER: Poller[0] NOTE: There are no items in your poller for this polling cycle!
09/23/2009 12:00:01 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /usr/local/groundwork/php/bin/php, ARGS: -q "/usr/local/groundwork/apache2/htdocs/cacti-0.8.7e/cmd.php" 1 1]
09/23/2009 12:00:01 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /usr/local/groundwork/php/bin/php, ARGS: -q "/usr/local/groundwork/apache2/htdocs/cacti-0.8.7e/cmd.php" 0 0]
09/23/2009 12:00:01 PM - POLLER: Poller[0] NOTE: Poller Int: '300', Cron Int: '300', Time Since Last: '299', Max Runtime '298', Poller Runs: '1'
When I run the scripts from shell (whilst su'd to the user I am running cacti as) I do get valid output:

Code: Select all

[nagios@sm01 cacti]$ perl /usr/local/groundwork/apache2/htdocs/cacti-0.8.7e/scrpts/linux_memory.pl MemFree:
442188
Can anyone suggest any causes/solutions for this? I'm running this on CentOS 5.2 also running an installtion of Grounwork Open Source (Nagios front end). I've searched on the forums, but all the solutions I found related to people writing their own scripts - not writing the ones that come out of the box.

Thanks in advance.

Duncan
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Looks like you don't have snmp turned on. You should open a ticket with GWorks.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
dunxd
Posts: 18
Joined: Wed Sep 23, 2009 5:51 am
Location: London, UK

Post by dunxd »

What makes you think SNMP isn't turned on?

Anyway - these are local checks that don't require SNMP aren't they?

The commands are retrieving counts sucessfully when run from command line as the same user that cactii runs as.

From the logs it also looks like the counts are being collected and passed to rrdtool:
09/23/2009 12:00:02 PM - POLLER: Poller[0] CACTI2RRD: /usr/local/groundwork/common/bin/rrdtool update /usr/local/groundwork/apache2/htdocs/cacti-0.8.7e/rra/localhost_mem_buffers_3.rrd --template mem_buffers 1253703601:U
But no lines on the graphs. So I am thinking that somehow the rrd files aren't getting updated correctly (because of the presence of the :U perhaps), or for some reason the script that generates the graphs is not reading the rrd files right.
dunxd
Posts: 18
Joined: Wed Sep 23, 2009 5:51 am
Location: London, UK

Post by dunxd »

Just to be carefull that I'm not being totally arrogant, I double checked snmpd is running and ran an snmpwalk:

Code: Select all

snmpwalk -v 1 -c public -O e 127.0.0.1
It is working ok.
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Let us know what Groundworks says.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
dunxd
Posts: 18
Joined: Wed Sep 23, 2009 5:51 am
Location: London, UK

Post by dunxd »

I'm not quite sure what question to ask Groundwork. Are you suggesting
that SNMP is not working on the target machine, that snmp support in PHP isn't working, or something else?

I can't really tell from the logs what the cause of the problem might be.

If I go to Groundworks and tell them "Cacti isn't working" without more detail they are only going to send me back here.
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Are you paying for support?
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
dunxd
Posts: 18
Joined: Wed Sep 23, 2009 5:51 am
Location: London, UK

Post by dunxd »

Nope - Community Edition. Forums only.
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Too bad, they give you a jacked up build and then expect you to buy to get support. The following, from the post anway, appears to have either a line break or a cr between the Name and the Value. There must be no space between the Name, the Colon ":", and the Value.
[nagios@sm01 cacti]$ perl /usr/local/groundwork/apache2/htdocs/cacti-0.8.7e/scrpts/linux_memory.pl MemFree:
442188
TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
peecee
Cacti User
Posts: 146
Joined: Tue Feb 26, 2008 7:26 am

Post by peecee »

That line above
09/23/2009 12:00:02 PM - POLLER: Poller[0] CACTI2RRD: /usr/local/groundwork/common/bin/rrdtool update /usr/local/groundwork/apache2/htdocs/cacti-0.8.7e/rra/localhost_mem_buffers_3.rrd --template mem_buffers 1253703601:U
1253703601 is unix epoch time for Wed, 23 Sep 2009 11:00:01 GMT. The U is unknown.

So it's not getting the data it needs for the rrd.
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Uhm, run the script from the command line please. It's getting data, but the output is hosed. "Read" my last post again.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
dunxd
Posts: 18
Joined: Wed Sep 23, 2009 5:51 am
Location: London, UK

Post by dunxd »

@TheWitness
"Read" my post again - that is me running the script from the command line;

Input:
perl /usr/local/groundwork/apache2/htdocs/cacti-0.87e/scripts/memory.pl MemFree:

Output:
442188

@peecee
Thanks for clarifying the output from the log
peecee
Cacti User
Posts: 146
Joined: Tue Feb 26, 2008 7:26 am

Post by peecee »

TheWitness wrote:Uhm, run the script from the command line please. It's getting data, but the output is hosed. "Read" my last post again.

TheWitness
LOL - look at the time of your post and mine. I think I was typing it in but you put yours in quicker. Now that I see your response, it definitely looks like the command line shows a <cr><lf> in the response, which is probably why the log/automatic collection effort shows a U. At least the OP has a solid reason for why the data being returned is a U now. :D
peecee
Cacti User
Posts: 146
Joined: Tue Feb 26, 2008 7:26 am

Post by peecee »

dunxd wrote:@TheWitness
"Read" my post again - that is me running the script from the command line;

Input:
perl /usr/local/groundwork/apache2/htdocs/cacti-0.87e/scripts/memory.pl MemFree:

Output:
442188

@peecee
Thanks for clarifying the output from the log
appears to have either a line break or a cr between the Name and the Value
TheWitness did read it - I missed this part by skimming over the answer too fast. So, at least you've got something to go back to Groundworks support (either the community or the company) to fix this. It is definitely not normal to put the data on a different line than the OID, which is essentially what they're doing.
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

No problem. Flames are free :). If Groundworks were donating money to our Beer cause, I would not be nearly as hostile. Unfortunately, they don't give a cent to the community in the last year or so. They have been good in the past paying for hotel in SF and some airfare, although they gross $24M+ a year and feed us peanuts (<$10k).

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests