Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sat May 27, 2017 9:09 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 56 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject: Anyone want to try my handiwork?
PostPosted: Wed Mar 08, 2006 1:12 am 
Offline
Cacti User

Joined: Sat Jul 30, 2005 2:15 pm
Posts: 138
I have created a set of templates for disk read/writes and disk load average ( for systems that support it).


Attachments:
graph_image.php.png
graph_image.php.png [ 30.83 KiB | Viewed 21981 times ]
graph_image-1.php.png
graph_image-1.php.png [ 39.52 KiB | Viewed 21981 times ]
File comment: This zip file has all the templates.
cacti-DiskIO.zip [14.8 KiB]
Downloaded 656 times
Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 22, 2006 6:06 am 
Offline
Cacti Pro User
User avatar

Joined: Wed Apr 09, 2003 2:17 am
Posts: 710
Location: Izmir/Turkey
In order to Document ı create a xml file. But I didnt find index oid. I have only these OIDs:
I have these OIDs:
.1.3.6.1.4.1.6213.2.4.1.1.1
.1.3.6.1.4.1.6213.2.4.1.1.2
.1.3.6.1.4.1.6213.2.4.1.2.1
.1.3.6.1.4.1.6213.2.4.1.2.2
.1.3.6.1.4.1.6213.2.4.1.3.1
.1.3.6.1.4.1.6213.2.4.1.3.2
.1.3.6.1.4.1.6213.2.4.1.4.5
.1.3.6.1.4.1.6213.2.4.1.4.6
.1.3.6.1.4.1.6213.2.4.1.4.7
.1.3.6.1.4.1.6213.2.4.1.4.8
.1.3.6.1.4.1.6213.2.4.1.4.9
.1.3.6.1.4.1.6213.2.4.1.4.10
.1.3.6.1.4.1.6213.2.4.1.4.2
.1.3.6.1.4.1.6213.2.4.1.4.3
.1.3.6.1.4.1.6213.2.4.1.4.4
But I cant find the index oid
How can I write a XML file for these oids?

_________________
Quote:
Cacti Version - 0.8.7e
Plugin Architecture - 2.5
Poller Type - CMD.php
Server Info - Linux 2.6.28-11-server
Web Server - Apache/2.2.11 (Ubuntu) PHP/5.2.6-3ubuntu4.5 with Suhosin-Patch
PHP - 5.2.6-3ubuntu4.5
PHP Extensions - zip, xmlwriter, libxml, xml, wddx, tokenizer, sysvshm, sysvsem, sysvmsg, session, SimpleXML, sockets, soap, SPL, shmop, standard, Reflection, posix, mime_magic, mbstring, json, iconv, hash, gettext, ftp, filter, exif, dom, dba, date, ctype, calendar, bz2, bcmath, zlib, pcre, openssl, xmlreader, apache2handler, gd, mysql, mysqli, PDO, pdo_mysql, rrdtool, snmp
MySQL - 5.0.75-0ubuntu10.2
RRDTool - 1.3.1
SNMP - 5.4.1
Plugins
    PHP Network Weathermap (weathermap - v0.97a)
    SuperLinks (superlinks - v0.8)
    Real-time statistics (zond - v0.34c)
    Host Info (hostinfo - v0.2)
    Report Creator (reports - v0.3)
    Global Plugin Settings (settings - v0.5)
    Network Discovery (discovery - v0.9)
    System Title Changer (titlechanger - v0.1)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 22, 2006 7:43 am 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22461
Location: Muenster, Germany
This is hard to guess without the MIB or an snmpwalk output with the textual representation of the OIDs
Reinhard

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 22, 2006 7:48 am 
Offline
Cacti Pro User
User avatar

Joined: Wed Apr 09, 2003 2:17 am
Posts: 710
Location: Izmir/Turkey
lvm wrote:
This is hard to guess without the MIB or an snmpwalk output with the textual representation of the OIDs
Reinhard


here is the MIB file
and textual representation:
Quote:
.iso.org.dod.internet.private.enterprises.juniperDX.dx.dxStats.systemStats.sessions.sessActive .1.3.6.1.4.1.6213.2.4.1.1.1 counter64
.iso.org.dod.internet.private.enterprises.juniperDX.dx.dxStats.systemStats.sessions.sessTotal .1.3.6.1.4.1.6213.2.4.1.1.2 counter64
.iso.org.dod.internet.private.enterprises.juniperDX.dx.dxStats.systemStats.requests.reqActive .1.3.6.1.4.1.6213.2.4.1.2.1 counter64
.iso.org.dod.internet.private.enterprises.juniperDX.dx.dxStats.systemStats.requests.reqTotal .1.3.6.1.4.1.6213.2.4.1.2.2 counter64
.iso.org.dod.internet.private.enterprises.juniperDX.dx.dxStats.systemStats.bytes.bytesIn .1.3.6.1.4.1.6213.2.4.1.3.1 counter64
.iso.org.dod.internet.private.enterprises.juniperDX.dx.dxStats.systemStats.bytes.bytesOut .1.3.6.1.4.1.6213.2.4.1.3.2 counter64
.iso.org.dod.internet.private.enterprises.juniperDX.dx.dxStats.systemStats.devicePerformance.bytesSaved .1.3.6.1.4.1.6213.2.4.1.4.5 counter64
.iso.org.dod.internet.private.enterprises.juniperDX.dx.dxStats.systemStats.devicePerformance.avgConnectionsPerDay .1.3.6.1.4.1.6213.2.4.1.4.6 counter64
.iso.org.dod.internet.private.enterprises.juniperDX.dx.dxStats.systemStats.devicePerformance.avgRequestsPerDay .1.3.6.1.4.1.6213.2.4.1.4.7 counter64
.iso.org.dod.internet.private.enterprises.juniperDX.dx.dxStats.systemStats.devicePerformance.avgBytesSavedPerDay .1.3.6.1.4.1.6213.2.4.1.4.8 counter64
.iso.org.dod.internet.private.enterprises.juniperDX.dx.dxStats.systemStats.devicePerformance.avgCPUUsed .1.3.6.1.4.1.6213.2.4.1.4.9 int32
.iso.org.dod.internet.private.enterprises.juniperDX.dx.dxStats.systemStats.devicePerformance.avgMemoryUsed .1.3.6.1.4.1.6213.2.4.1.4.10 int32
.iso.org.dod.internet.private.enterprises.juniperDX.dx.dxStats.systemStats.devicePerformance.connectionsAccepted .1.3.6.1.4.1.6213.2.4.1.4.2 counter64
.iso.org.dod.internet.private.enterprises.juniperDX.dx.dxStats.systemStats.devicePerformance.connectionsRefused .1.3.6.1.4.1.6213.2.4.1.4.3 counter64
.iso.org.dod.internet.private.enterprises.juniperDX.dx.dxStats.systemStats.devicePerformance.requestsProcessed .1.3.6.1.4.1.6213.2.4.1.4.4 counter64


Attachments:
DX-STATS.zip [13.38 KiB]
Downloaded 616 times

_________________
Quote:
Cacti Version - 0.8.7e
Plugin Architecture - 2.5
Poller Type - CMD.php
Server Info - Linux 2.6.28-11-server
Web Server - Apache/2.2.11 (Ubuntu) PHP/5.2.6-3ubuntu4.5 with Suhosin-Patch
PHP - 5.2.6-3ubuntu4.5
PHP Extensions - zip, xmlwriter, libxml, xml, wddx, tokenizer, sysvshm, sysvsem, sysvmsg, session, SimpleXML, sockets, soap, SPL, shmop, standard, Reflection, posix, mime_magic, mbstring, json, iconv, hash, gettext, ftp, filter, exif, dom, dba, date, ctype, calendar, bz2, bcmath, zlib, pcre, openssl, xmlreader, apache2handler, gd, mysql, mysqli, PDO, pdo_mysql, rrdtool, snmp
MySQL - 5.0.75-0ubuntu10.2
RRDTool - 1.3.1
SNMP - 5.4.1
Plugins
    PHP Network Weathermap (weathermap - v0.97a)
    SuperLinks (superlinks - v0.8)
    Real-time statistics (zond - v0.34c)
    Host Info (hostinfo - v0.2)
    Report Creator (reports - v0.3)
    Global Plugin Settings (settings - v0.5)
    Network Discovery (discovery - v0.9)
    System Title Changer (titlechanger - v0.1)
Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 23, 2006 8:00 am 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22461
Location: Muenster, Germany
That does not look like an snmptable. These are "only" multiple, but single, OIDs. So you may copy the "SNMP - Generic OID Template" once for each OID are write a wrapper script that queries all those OIDs and spits them out in one single line (a Data Input Method)
Reinhard

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject: Re: Typo?
PostPosted: Thu Jul 20, 2006 8:47 am 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22461
Location: Muenster, Germany
/usr/local/dick wrote:
Very nice walkthrough, but there appear to be some typo's, unfortunately also in the code examples.
Sometimes you refer to hrStoragetable and sometime to hrStoragedTable (note the d).
Thank you for pointing this out. I won't correct this issue here, as a new development system will "soon" be available. This HowTo was ported, too.
Reinhard

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 21, 2006 10:43 am 
Offline
Cacti User

Joined: Mon Jan 09, 2006 11:33 am
Posts: 54
Location: SE of LIML
JJX wrote:
When i try to load the xml of the example ("Chapter I: Building raw XML file") i get these errors:

Quote:
Notice: Undefined index: arg_index in /var/www/cacti/lib/data_query.php on line 98

Notice: Undefined index: script_path in /var/www/cacti/lib/data_query.php on line 98

Notice: Undefined index: arg_query in /var/www/cacti/lib/data_query.php on line 109

Notice: Undefined index: query_name in /var/www/cacti/lib/data_query.php on line 109

Notice: Undefined index: script_path in /var/www/cacti/lib/data_query.php on line 109

Warning: Cannot modify header information - headers already sent by (output started at /var/www/cacti/lib/data_query.php:98) in /var/www/cacti/host.php on line 129



any idea?



got this fixed by adding

error_reporting(E_ERROR);

as the first line of data_query.php

Luca


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 31, 2006 7:03 am 
Offline

Joined: Sun Dec 31, 2006 6:57 am
Posts: 8
hi *,

i created a graph for SNMP CPU load according to this howto, but i


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 31, 2006 8:34 am 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22461
Location: Muenster, Germany
Please repeat your question and do not use "strange" characters, phpBB does not like them
Reinhard

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 31, 2006 9:01 am 
Offline

Joined: Sun Dec 31, 2006 6:57 am
Posts: 8
i went through this howto for getting the cpu load of an win server by snmp and got an error making the graph. here is the errormessage:

Code:
RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="fit-w2ks-amd - CPU Load" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
DEF:a="/usr/local/cacti/rra/fitw2ksamd_cpu_load_windows_30.rrd":CPU_Load_Windows:AVERAGE \
LINE1:a#FF0000:"Procent"

RRDTool Says:

ERROR: opening '/usr/local/cacti/rra/fitw2ksamd_cpu_load_windows_30.rrd': No such file or directory


here is my xml file:


Code:
<interface>
        <name>Get Windows CPU Load</name>
        <description>Get SNMP based Partition Information out of hrStorageTable</description>
        <index_order_type>numeric</index_order_type>
        <oid_index>1.3.6.1.2.1.25.3.3.1</oid_index>

        <fields>
                <hrProcessorLoad>
                        <name>Index</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>1.3.6.1.2.1.25.3.3.1.2</oid>
                </hrProcessorLoad>
        </fields>
</interface>


where is my mistake?

thx 4 help and happy new year!

Andre


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 01, 2007 9:43 am 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22461
Location: Muenster, Germany
Please run from command line
Code:
snmpwalk -c <community> -v 1 <host> 1.3.6.1.2.1.25.3.3.1
to check, if the host is responding. Please prepend your OIDs in the XML file with a leading . (dot).
Reinhard

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 01, 2007 10:16 am 
Offline

Joined: Sun Dec 31, 2006 6:57 am
Posts: 8
thx.

now it is working. i restarted the snmp deamon and it worked.

Andre


Top
 Profile  
 
 Post subject: Re: Chapter II: Insert all descriptive table columns
PostPosted: Mon Feb 25, 2008 8:40 pm 
Offline

Joined: Thu Dec 06, 2007 7:58 pm
Posts: 13
Quote:
e.g. the first Description will be fetched from OID = .1.3.6.1.2.1.25.2.3.1.3.1 (that is base OID = .1.3.6.1.2.1.25.2.3.1.3 together with the appended index .1 will form the complete OID .1.3.6.1.2.1.25.2.3.1.3.1.


Just trying to understand the behavour of this :)

From what I can see a "walk" on input will not have the index appended, but for output it will?

As when I was trying to get the descriptions for various CPU 5 min averages from a router for which there are multiple CPUs, the descriptions were stored amongst descriptions for other stuff. Therefore a walk would return a whole pile of unrelevant descriptions (meaning the index value was not appended to the OID)and was of no use to me. I had to use method "get" to ensure I only received the descriptions I was after based on the index values.

But if direction set to output a walk willl have index values appended?

Is this intentional?

I have a case where for the descriptions I need to retreive them based on the index value (which for input works with get), but for the actual data I do not want this, I simply want t o walk to get them:

Procedure for Devices with Multiple CPUs
http://www.cisco.com/warp/public/477/SN ... l#multiple

So I have this;
Code:
<interface>
        <name>Cisco EnvMon CPU</name>
        <description>Get Cisco Environmental CPU Data</description>
        <oid_index>.1.3.6.1.4.1.9.9.109.1.1.1.1.2</oid_index>
        <fields>
               <CPUStatusDescr>
                        <name>CPU Description</name>
                        <method>get</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.2.1.47.1.1.1.1.7</oid>
               </CPUStatusDescr>
                <CPUStatus>
                        <name>CPU Status</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.9.9.109.1.1.1.1.5</oid>
                </CPUStatus>

        </fields>


</interface>



This works fine for the descriptions, but for the output it's appending the index and it breaks..for the output I merely want to walk that oid!

(as in the index is only valid for fetching the descriptions, using the index for the output breaks it!)

So given the multicpu oid setup as described by the Cisco document I have linked to (where the description index is different tothat of the actual value index), is what I'm trying to accomplish possible?

Given this is my first attempt at doing an indexed SNMP data query I'm not sure if what I'm attempting is going to work or if I'm going to ahve to resort to excluding descriptions and rely on a human to enter them manually at point of graph creation?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 28, 2008 5:00 pm 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22461
Location: Muenster, Germany
Please post snmpwalks of the OIDs used so I can understand better
Reinhard

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 28, 2008 7:27 pm 
Offline

Joined: Thu Dec 06, 2007 7:58 pm
Posts: 13
gandalf wrote:
Please post snmpwalks of the OIDs used so I can understand better
Reinhard


Sure.

Ok to grab the actual CPU 5 min averages I can walk this:
Code:
snmpwalk -v 2c -c public x.x.x.x 1.3.6.1.4.1.9.9.109.1.1.1.1.5
SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.5.1 = Gauge32: 10
SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.5.2 = Gauge32: 6
SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.5.3 = Gauge32: 1

Ok, so this device returned results for three CPU's. Now, to quote the Cisco document "identify the physical entity to which these values correspond" I must walk the following:

Code:
snmpwalk -v 2c -c public x.x.x.x .1.3.6.1.4.1.9.9.109.1.1.1.1.2
SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.2.1 = INTEGER: 3017
SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.2.2 = INTEGER: 3001
SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.2.3 = INTEGER: 1009

Ok, so now given the values 3017, 3001 and 1009 I can now retreive the descriptions for these three CPU's, by using oid .1.3.6.1.2.1.47.1.1.1.1.7 and appending the 3017,3001 and 1009 values:

Code:
snmpget -v 2c -c public x.x.x.x .1.3.6.1.2.1.47.1.1.1.1.7.3017
SNMPv2-SMI::mib-2.47.1.1.1.1.7.3017 = STRING: "CPU of Routing Processor 5"



Code:
snmpget -v 2c -c public x.x.x.x .1.3.6.1.2.1.47.1.1.1.1.7.3001
SNMPv2-SMI::mib-2.47.1.1.1.1.7.3001 = STRING: "CPU of Switching Processor 5"



Code:
snmpget -v 2c -c public x.x.x.x .1.3.6.1.2.1.47.1.1.1.1.7.1009
SNMPv2-SMI::mib-2.47.1.1.1.1.7.1009 = STRING: "CPU of Sub-Module 1 CFC Card"



SO that's the problem. I can get the descriptions working by using .1.3.6.1.4.1.9.9.109.1.1.1.1.2 for the index. But then I can't fetch the CPU values. So as seen in my xml file, the descriptions arn't the problem.

So, when the index value is appended to the oid I want to walk to get the CPU values, it of course breaks (as that index is only valid for retreiving the descriptions). That's when I discovered that there appears to be different behaviour for get and walk in the xml interface depending on direction. For input if I do a walk it does not append index. As i if I did a walk for descriptions oid then it would retrive the whole list of everything. If I changed method to get then it did what I want. But for the output section, a walk does have the index value appended. And if using the index used to fetch the descriptions, it will break.

Hope that makes sense.

And cheers for any help, even if it's a " can't be done due ot the way they have implemented this on the 76s". At least then I know and wont worry about it any longer :)


Oh, and yeah if you just walk 1.3.6.1.2.1.47.1.1.1.1.7 (the oid used to get descriptions) then you get descriptions for all kinds of stuff:

Code:
snmpwalk -v 2c -c public x.x.x.x .1.3.6.1.2.1.47.1.1.1.1.7
SNMPv2-SMI::mib-2.47.1.1.1.1.7.1 = STRING: "CISCO7606-S"
SNMPv2-SMI::mib-2.47.1.1.1.1.7.2 = STRING: "Physical Slot 1"
SNMPv2-SMI::mib-2.47.1.1.1.1.7.3 = STRING: "Physical Slot 2"
SNMPv2-SMI::mib-2.47.1.1.1.1.7.4 = STRING: "Physical Slot 3"
SNMPv2-SMI::mib-2.47.1.1.1.1.7.5 = STRING: "Physical Slot 4"
SNMPv2-SMI::mib-2.47.1.1.1.1.7.6 = STRING: "Physical Slot 5"
SNMPv2-SMI::mib-2.47.1.1.1.1.7.7 = STRING: "Physical Slot 6"
SNMPv2-SMI::mib-2.47.1.1.1.1.7.8 = STRING: "Backplane"
SNMPv2-SMI::mib-2.47.1.1.1.1.7.9 = STRING: "fan-tray 1 fan-fail Sensor"
SNMPv2-SMI::mib-2.47.1.1.1.1.7.10 = STRING: "Container of Fan FRU 1"
SNMPv2-SMI::mib-2.47.1.1.1.1.7.11 = STRING: "FAN-MOD-6SHS 1"
SNMPv2-SMI::mib-2.47.1.1.1.1.7.12 = STRING: "Container of Container of Power Supply"


Rest of output deleted, as there's quite a bit of stuff in there!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 56 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group