Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


pure SNMP Replacement for SNMP - Get Processor Information
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates
Author Message
gandalf
Developer


Joined: 02 Dec 2004
Posts: 12295
Location: Muenster, Germany

PostPosted: Sat Apr 26, 2008 11:14 am    Post subject: pure SNMP Replacement for SNMP - Get Processor Information Reply with quote

This is a pure (aka FAST) replacement of standard "SNMP - Get Processor Information".
It uses advanced SNMP Data Query XML options to provide not only the data required, but the name of the processor found!
Be prepared, that not all SNMP implementations provide data for this query. Even worse, I encountered some hosts that respond well to query indexing but don't provide the hrProcessorLoad itself.
To verify this, please run snmpwalk against .1.3.6.1.2.1.25.3.3.1.2. If no data found, please update SNMP on the target host!
Reinhard



Bildschirmfoto.png
 Description:
A screenshot
 Filesize:  16.96 KB
 Viewed:  8939 Time(s)

Bildschirmfoto.png



hrProcessorLoad.xml
 Description:
The XML file to be placed into ./resource/snmp_queries

Download
 Filename:  hrProcessorLoad.xml
 Filesize:  1.06 KB
 Downloaded:  787 Time(s)


cacti087b_data_query_snmp_-_hrprocessorload.xml
 Description:
The Data Query to import
Use at least cacti 087b!

Download
 Filename:  cacti087b_data_query_snmp_-_hrprocessorload.xml
 Filesize:  16.01 KB
 Downloaded:  665 Time(s)



Last edited by gandalf on Mon Apr 28, 2008 12:29 pm; edited 1 time in total
Back to top
niobe
Cacti User


Joined: 10 Mar 2008
Posts: 125
Location: Australia

PostPosted: Sun Apr 27, 2008 5:22 am    Post subject: Reply with quote

nice
Back to top
diablo62



Joined: 28 Apr 2008
Posts: 6

PostPosted: Tue Apr 29, 2008 4:19 am    Post subject: Reply with quote

I'm a problem at the creation of rra files

In graph mangement i have this :

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="CAB-S03 - hrProcessorLoad |query_hrProcessorFrwID|" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="Load" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/var/www/cacti/rra/cab-s03_load_83.rrd":load:AVERAGE \
COMMENT:"CPU\: |query_hrDeviceDescr|\n" \
AREA:a#FF0000FF:"Load" \
GPRINT:a:LAST:"Current\:%8.2lf %s" \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:a:MAX:"Maximum\:%8.2lf %s\n"
RRDTool Says:

ERROR: opening '/var/www/cacti/rra/cab-s03_load_83.rrd': No such file or directory

AND in data sources i have this :

/usr/bin/rrdtool create \
/var/www/cacti/rra/cab-s03_load_83.rrd \
--step 300 \
DS:load:GAUGE:600:0:120 \
RRA:AVERAGE:0.5:1:500 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:500 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \

Cactiuser have all rights and i have chmod 777 -r on rra, log and ressources directory.

Please help me
Back to top
gandalf
Developer


Joined: 02 Dec 2004
Posts: 12295
Location: Muenster, Germany

PostPosted: Tue Apr 29, 2008 3:15 pm    Post subject: Reply with quote

Did you run the snmpwalk against the OID given in my first post? Please post results
Reinhard
Back to top
diablo62



Joined: 28 Apr 2008
Posts: 6

PostPosted: Wed Apr 30, 2008 2:14 am    Post subject: Reply with quote

I've

HOST-RESOURCES-MIB::hrProcessorLoad.3 = INTEGER: 0
HOST-RESOURCES-MIB::hrProcessorLoad.4 = INTEGER: 0

I think it's good. No ?
Back to top
gandalf
Developer


Joined: 02 Dec 2004
Posts: 12295
Location: Muenster, Germany

PostPosted: Sun May 04, 2008 2:02 pm    Post subject: Reply with quote

Hmm, please try .1.3.6.1.2.1.25.3.3 now and post the whole stuff
Reinhard
Back to top
diablo62



Joined: 28 Apr 2008
Posts: 6

PostPosted: Tue May 13, 2008 2:27 am    Post subject: Reply with quote

I'm sorry, i have been on holiday

for oid .1.3.6.1.2.1.25.3.3
I have :
snmpwalk result
HOST-RESOURCES-MIB::hrProcessorFrwID.3 = OID: SNMPv2-SMI::zeroDotZero
HOST-RESOURCES-MIB::hrProcessorFrwID.4 = OID: SNMPv2-SMI::zeroDotZero
HOST-RESOURCES-MIB::hrProcessorLoad.3 = INTEGER: 0
HOST-RESOURCES-MIB::hrProcessorLoad.4 = INTEGER: 0

Cacti graph debug mode

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="CAB-S03 - hrProcessorLoad |query_hrProcessorFrwID|" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="Load" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/var/www/cacti/rra/cab-s03_load_83.rrd":load:AVERAGE \
COMMENT:"CPU\: |query_hrDeviceDescr|\n" \
AREA:a#FF0000FF:"Load" \
GPRINT:a:LAST:"Current\:%8.2lf %s" \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:a:MAX:"Maximum\:%8.2lf %s\n"
RRDTool Says:

ERROR: opening '/var/www/cacti/rra/cab-s03_load_83.rrd': No such file or directory
Back to top
gandalf
Developer


Joined: 02 Dec 2004
Posts: 12295
Location: Muenster, Germany

PostPosted: Tue May 13, 2008 2:56 pm    Post subject: Reply with quote

Is this the only graph for that device? What is the devices status (from device list)? Are you running cmd.php or spine?
Reinhard
Back to top
diablo62



Joined: 28 Apr 2008
Posts: 6

PostPosted: Wed May 14, 2008 4:52 am    Post subject: Reply with quote

I have only one graph for this device and i use cmd.php
I don't know it does'nt want to create the rrd file
Back to top
gandalf
Developer


Joined: 02 Dec 2004
Posts: 12295
Location: Muenster, Germany

PostPosted: Thu May 15, 2008 1:19 pm    Post subject: Reply with quote

You didn't answer to the question about the hosts's status. I fear it is either down or undefined. This is normally a hint for a problem with downed device detection for that host. Please select SNMP as downed device detectionmethod and retry
Reinhard
Back to top
diablo62



Joined: 28 Apr 2008
Posts: 6

PostPosted: Fri May 16, 2008 8:09 am    Post subject: Reply with quote

I ve check all device are up i have delete graph and data sources but it's the same problem it can't create the rrd file but he have all right (777) on the directory
Back to top
Savages



Joined: 16 May 2008
Posts: 1

PostPosted: Fri May 16, 2008 8:39 am    Post subject: Reply with quote

i did not import the scripts yet, but i was wondering. I have the following output on a SNMP-walk, system is a Compaq dx2300 running Windows XP:
Code:
snmpwalk -v2c -c <community> <ipadres> .1.3.6.1.2.1.25.3.3
HOST-RESOURCES-MIB::hrProcessorFrwID.6 = OID: SNMPv2-SMI::zeroDotZero
HOST-RESOURCES-MIB::hrProcessorFrwID.7 = OID: SNMPv2-SMI::zeroDotZero
HOST-RESOURCES-MIB::hrProcessorLoad.6 = INTEGER: 0
HOST-RESOURCES-MIB::hrProcessorLoad.7 = INTEGER: 0
ssorLoad.7 = INTEGER: 0

Is this enough output to be usefull?
Back to top
Kro



Joined: 27 Mar 2008
Posts: 37

PostPosted: Fri May 16, 2008 4:03 pm    Post subject: Reply with quote

gandalf, what values should we put here ?


nnn.JPG
 Description:
 Filesize:  16.88 KB
 Viewed:  7833 Time(s)

nnn.JPG


Back to top
gandalf
Developer


Joined: 02 Dec 2004
Posts: 12295
Location: Muenster, Germany

PostPosted: Sun May 18, 2008 8:32 am    Post subject: Reply with quote

How did you get to that page? It is not supposed to pop up anywhere
Reinhard
Back to top
Kro



Joined: 27 Mar 2008
Posts: 37

PostPosted: Sun May 18, 2008 3:49 pm    Post subject: Reply with quote

Just after I had clicked on create button.


graph_templates.JPG
 Description:
 Filesize:  24.33 KB
 Viewed:  7739 Time(s)

graph_templates.JPG


Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 



Powered by phpBB © 2001, 2005 phpBB Group