Poller cache shows wrong path to script

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

Moderators: Developers, Moderators

Post Reply
suretass
Posts: 5
Joined: Sat Apr 10, 2010 4:33 am

Poller cache shows wrong path to script

Post by suretass »

Hi all,

I am afraid I am new to Cacti but have managed to muddle through and get most of what I want working. There is one thing that I am stumbling on though and I have searched extensively for a clue to the problem but found nothing.


I have added a poller script for Netscreen's by Fletcher Cocquyt but it fails on the poller cycle with the following log output (In verbose mode).

04/09/2010 11:15:03 AM - CMDPHP: Poller[0] Host[5] DS[34] WARNING: Result from CMD not valid. Partial Result: U
04/09/2010 11:15:03 AM - CMDPHP: Poller[0] Host[5] DS[33] CMD: /usr/local/cacti/scripts/netscreen_stats.pl , output: U

This shows it trying to execute the script from the wrong path and I can't find anywhere to change this.

Here is the output from looking at the poller cache.

Script: /usr/local/cacti/scripts/netscreen_stats.pl
RRD: /opt/cacti-0.8.7e/rra/fccnsfw01_cpu1_32.rrd

The correct location is not /usr/local but actually /opt/cacti-0.8.7e/scripts/netscreen_stats.pl


Any help greatly appreciated from those more familiar!
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please run cli/rebuild_poller_cache.php and retry
R.
suretass
Posts: 5
Joined: Sat Apr 10, 2010 4:33 am

Post by suretass »

Thank you for the reply Gandalf, I appreciate the input.

I had already tried the 'Rebuild Poller Cache' option under utilities in the GUI but have now executed the cli command. I am afraid nothing has changed after either of these.


xxxxxfw01 - Netscreen Stats Script: /usr/local/cacti/scripts/netscreen_stats.pl
RRD: /opt/cacti-0.8.7e/rra/xxxxxfw01_cpu1_32.rrd

xxxxxfw01 - Netscreen Stats Script: /usr/local/cacti/scripts/netscreen_stats.pl
RRD: /opt/cacti-0.8.7e/rra/xxxxxfw01_cpu1_33.rrd

xxxxxfw01 - Netscreen Stats Script: /usr/local/cacti/scripts/netscreen_stats.pl
RRD: /opt/cacti-0.8.7e/rra/xxxxxfw01_cpu1_34.rrd

This is the output in the poller cache window.

I have tried to find the config file that contains the rogue path but I can't seem to find out what this might be. If I havn't provided information that would be helpful then please let me know what else might assist.

Thanks again
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

suretass wrote:I have tried to find the config file that contains the rogue path but I can't seem to find out what this might be. If I havn't provided information that would be helpful then please let me know what else might assist.

Thanks again
Please see include/global.php
R.
suretass
Posts: 5
Joined: Sat Apr 10, 2010 4:33 am

Post by suretass »

No reference to the path in that file I am afraid. I actually searched the whole Cacti path for any reference to this ficticious path and have found nothing.

Currently I am completely lost as to why the scripts are trying to execute from a non existant path. Is anyone able to suggest anything?


Cheers,
User avatar
Hyperlord
Cacti User
Posts: 211
Joined: Tue Feb 10, 2009 3:24 am
Location: Frankfurt (a.M.), Germany

Post by Hyperlord »

Something wrong with perl? When you run that script from cli, is there anything else?
Om Tat Sat
suretass
Posts: 5
Joined: Sat Apr 10, 2010 4:33 am

Post by suretass »

Perl looks to be fine,

[root@xxxlxces01 scripts]# perl ./netscreen_stats.pl 192.168.0.1
cpu1:4 cpu5:2 cpu15:2 memory_allocated:29358560 memoryAvailable:40125216 memoryFragmented:22 sessionsAll ocated:11 sessionsMaximum:8064 sessionsFailed:0


The actual script seems to work fine. The problem appears to me simply that Cacti is trying to call the script from a non existant path. Unless I am missing something here?
suretass
Posts: 5
Joined: Sat Apr 10, 2010 4:33 am

Post by suretass »

Sorry to bump this post, I am still trying to get to the bottom of why Cacti might call scripts from a non existant directory path.

Can anyone point me to why this may be? Currently I am not able to poll key stats from my netscreen firewall.

Summary is :

Cacti is calling my netscreen poller script from "/usr/local/cacti/scripts/netscreen_stats.pl"

Actual path of the script is "/opt/cacti-0.8.7e/scripts/netscreen_stats.pl"

Attempts to run the script directly yield a success at the command line with the SNMP data returned.

Poller cache has been rebuilt with no affect.

Cheers,
Russ
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Check the data templates etc. My guess is that this may be a hard coded path somewhere.
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest