Script graphing not working ,Please please please help

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
Shivaramakrishnan
Posts: 22
Joined: Tue Feb 26, 2013 3:37 pm

Script graphing not working ,Please please please help

Post by Shivaramakrishnan »

Hello
I am a newbie to cacti.I am trying to get a graphing of my script.Attached the complete script.
Here is what I did,

1.
Create a Data Input Method:
Name Squid Server Traffic
Input type Script/Command
Input String /home/svaidyanathan/check_squid30 <a.b.c.d> ( Herea.b.c.d is the arguement to my script)

Create was successful.
Then added the input and output fields to this Data input method.
Input fields - None
Output fields - HttpInKb,HttpOutKb,ServerInKb,ServerOutKb

Save was successful.

2.
Create Data Sources
Selected Data template None
Host pxy01-ple01.atl2 (hostname of ip a.b.c.d)

Create was successful.
Added the name of the data source -Squid Traffic
Data Source Path - Blank
Data Input method - Squid Sever traffic (name that i created in the previous step).
step - 300

Data Source Item
Internal Data Source Name - ServerInKb
Minimum Value - 0
Max Value - U
Data Source Type - GAUGE
Output Field - ServerInKb-ServerInKb

I added the other three ServerOutKb,HttpInKb,HttpOutKb as other 3 data items for this data source.

Saved the data source.

3.
Create Graph
Graph Management Add under the host required.
Selected Graph Template - None
Host -pxy01-ple01.atl2

Named the graph as Squid Traffic
Named the Vertical label as Kb/s
Upper limit to be U
Save was successful.


Then added the graph items
Item1 - ServerInKb
Item2 - ServerOutKb,
Item3 - HttpInKb
Item4 - HttpOutKb


Save,Then tried to turn on the graph in debug mode,
Says
RRDTool Says:
ERROR: opening '/home/websites/cacti.flex.cudaops.com/rra/pxy01-ple01_atl2_serverinkb_1024.rrd': No such file or directory


I am not able to figure out what am I doing wrong here,Anyone please help as I am pondering over this issue for 3 days now.I followed the instructions as per link
http://www.cacti.net/downloads/docs/html/how_to.html

This is how I run the script from command line.
root@graphy01:/home/svaidyanathan# ./check_squid3a a.b.c.d
Output:
ServerInKB=705 ServerOutKB=53 HttpInKB=63 HttpOutKB=699|ServerInKb=705;ServerOutKb=53;HttpInKb=63;HttpOutKb=699


Logs :
03/12/2013 03:26:40 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1024.
03/12/2013 03:26:40 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1024.
03/12/2013 03:26:56 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1024.
03/12/2013 03:26:56 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1024.
03/12/2013 03:27:12 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1024.
03/12/2013 03:27:12 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1024.
03/12/2013 03:27:28 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1024.
03/12/2013 03:27:28 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1024.
03/12/2013 03:27:44 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1024.
03/12/2013 03:27:44 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1024.
03/12/2013 03:28:00 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1024.
03/12/2013 03:28:00 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1024.
03/12/2013 03:28:16 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1024.
03/12/2013 03:28:16 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1024.
03/12/2013 03:28:32 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1024.
03/12/2013 03:28:32 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1024.
03/12/2013 03:28:48 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1024.
03/12/2013 03:28:48 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1024.
03/12/2013 03:29:04 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1024.
03/12/2013 03:29:04 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1024.
03/12/2013 03:29:20 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1024.
03/12/2013 03:29:20 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1024.
03/12/2013 03:29:37 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1024.
03/12/2013 03:29:37 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1024.
03/12/2013 03:29:52 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1024.
03/12/2013 03:29:52 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1024.

Please help!!!! :( :( :( :( :( :( :(
Attachments
servertraffic.txt
(2.76 KiB) Downloaded 151 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Script graphing not working ,Please please please help

Post by gandalf »

Shivaramakrishnan wrote:Hello
I am a newbie to cacti.I am trying to get a graphing of my script.Attached the complete script.
Here is what I did,

1.
Create a Data Input Method:
Name Squid Server Traffic
Input type Script/Command
Input String /home/svaidyanathan/check_squid30 <a.b.c.d> ( Herea.b.c.d is the arguement to my script)

Create was successful.
Then added the input and output fields to this Data input method.
Input fields - None
Output fields - HttpInKb,HttpOutKb,ServerInKb,ServerOutKb

Save was successful.
That makes no sense to me (or I don't understand).
The input string defines some parameters <a.b.c.d> but you did not define them (Input fields - None).
Please see walkthroughs at 1st link of my sig
R.
Shivaramakrishnan
Posts: 22
Joined: Tue Feb 26, 2013 3:37 pm

Re: Script graphing not working ,Please please please help

Post by Shivaramakrishnan »

Input String <path_cacti>/scripts/check_squid3a <ip>

where ip is field added in paranthesis

Then added the input and output fields to this Data input method.
Input fields -
Name Field Order Friendly Name
ip 1 IP Address


Output fields - HttpInKb,HttpOutKb,ServerInKb,ServerOutKb


But from command line,it works.
root@graphy01:<path_cacti>/scripts# ./check_squid3a 192.168.1.2
Output:
ServerInKB=705 ServerOutKB=53 HttpInKB=63 HttpOutKB=699|ServerInKb=705;ServerOutKb=53;HttpInKb=63;HttpOutKb=699
Last edited by Shivaramakrishnan on Tue Mar 19, 2013 12:27 pm, edited 4 times in total.
Shivaramakrishnan
Posts: 22
Joined: Tue Feb 26, 2013 3:37 pm

Re: Script graphing not working ,Please please please help

Post by Shivaramakrishnan »

I followed your link for creating graphs from scripts.When I turn on debugging,seeing this info.Please help.

RRDTool Command:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title='pxy01-ple01.atl2-Squid Traffic' \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit='0' \
--vertical-label='Kb/Sec' \
--slope-mode \
--font TITLE:10: \
--font AXIS:7: \
--font LEGEND:8: \
--font UNIT:7: \
DEF:a="/home/websites/myname.com/rra/pxy01-ple01_atl2_httpintraffic_1072.rrd":'HttpInTraffic':AVERAGE \
DEF:b="/home/websites/myname.com/rra/pxy01-ple01_atl2_httpintraffic_1072.rrd":'HttpOutTraffic':AVERAGE \
DEF:c="/home/websites/myname.com/rra/pxy01-ple01_atl2_httpintraffic_1072.rrd":'ServerInTraffic':AVERAGE \
DEF:d="/home/websites/myname.com/rra/pxy01-ple01_atl2_httpintraffic_1072.rrd":'ServerOutTraffic':AVERAGE \
\
\
\
RRDTool Says:
ERROR: opening '/home/websites/myname.com/rra/pxy01-ple01_atl2_serveroutkb_1079.rrd': No such file or directory


I see nothing in graph,Is there anything I am missing here?
Please somebody help :( :( :( :(
Shivaramakrishnan
Posts: 22
Joined: Tue Feb 26, 2013 3:37 pm

Re: Script graphing not working ,Please please please help

Post by Shivaramakrishnan »

Please help !!!Any suggestions is greatly appreciated.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest