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    


[HOWTO] Add new MIB Variables to Cacti
Goto page Previous  1, 2, 3, 4  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Informational/HOWTO's
Author Message
..::BFS::..
Cacti User


Joined: 12 Mar 2004
Posts: 52
Location: Beusichem

PostPosted: Thu Sep 30, 2004 2:16 am    Post subject: Reply with quote

I've tried to set up my own xml file for a snmp query. I can see that I get some results:

Code:

+ Running data query [10].
+ Found type = '3' [snmp query].
+ Found data query XML file at 'C:\Apache2\htdocs\cacti/resource/snmp_queries/pix_con.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.4..9.9.147.1.2.2.2.1.3.40.6'
+ Located input field 'pixConIndex' [walk]
+ Executing SNMP walk for data @ '.1.3.6.4..9.9.147.1.2.2.2.1.3.40.6'
+ Found item [pixConIndex='Cisco PIX Firewall Version 6.3(3)'] index: 0 [from value]
+ Found item [pixConIndex='OID: enterprises.9.1.417'] index: 0 [from value]
+ Found item [pixConIndex='1538432800'] index: 0 [from value]
+ Found item [pixConIndex='Quaere'] index: 0 [from value]
+ Found item [pixConIndex='eurutpix01'] index: 0 [from value]
+ Found item [pixConIndex='Nieuwegein'] index: 0 [from value]
+ Found item [pixConIndex='4'] index: 0 [from value]
+ Found item [pixConIndex='2'] index: 0 [from value]
+ Found item [pixConIndex='1'] index: 1 [from value]
+ Found item [pixConIndex='2'] index: 2 [from value]
+ Found item [pixConIndex='PIX Firewall outside interface'] index: 1 [from value]
+ Found item [pixConIndex='PIX Firewall inside interface'] index: 2 [from value]
+ Found item [pixConIndex='ethernetCsmacd(6)'] index: 1 [from value]
+ Found item [pixConIndex='ethernetCsmacd(6)'] index: 2 [from value]
+ Found item [pixConIndex='1500'] index: 1 [from value]
+ Found item [pixConIndex='1500'] index: 2 [from value]
+ Found item [pixConIndex='10000000'] index: 1 [from value]
+ Found item [pixConIndex='100000000'] index: 2 [from value]
+ Found item [pixConIndex='00:0F:23:7F:21:93'] index: 1 [from value]
+ Found item [pixConIndex='00:0F:23:7F:21:95'] index: 2 [from value]
+ Found item [pixConIndex='up(1)'] index: 1 [from value]
+ Found item [pixConIndex='up(1)'] index: 2 [from value]
+ Found item [pixConIndex='up(1)'] index: 1 [from value]
+ Found item [pixConIndex='up(1)'] index: 2 [from value]
+ Found item [pixConIndex='0'] index: 1 [from value]
+ Found item [pixConIndex='0'] index: 2 [from value]
+ Found item [pixConIndex='3557631982'] index: 1 [from value]
+ Found item [pixConIndex='1698275673'] index: 2 [from value]
+ Found item [pixConIndex='7004427'] index: 1 [from value]
+ Found item [pixConIndex='5141609'] index: 2 [from value]
+ Found item [pixConIndex='7'] index: 1 [from value]
+ Found item [pixConIndex='352586'] index: 2 [from value]
+ Found item [pixConIndex='0'] index: 1 [from value]
+ Found item [pixConIndex='0'] index: 2 [from value]
+ Found item [pixConIndex='0'] index: 1 [from value]
+ Found item [pixConIndex='0'] index: 2 [from value]
+ Found item [pixConIndex='0'] index: 1 [from value]
+ Found item [pixConIndex='8'] index: 2 [from value]
+ Found item [pixConIndex='1835331528'] index: 1 [from value]
+ Found item [pixConIndex='3332800856'] index: 2 [from value]
+ Found item [pixConIndex='6450319'] index: 1 [from value]
+ Found item [pixConIndex='5628972'] index: 2 [from value]
+ Found item [pixConIndex='0'] index: 1 [from value]
+ Found item [pixConIndex='0'] index: 2 [from value]
+ Found item [pixConIndex='0'] index: 1 [from value]
+ Found item [pixConIndex='0'] index: 2 [from value]
+ Found item [pixConIndex='0'] index: 1 [from value]
+ Found item [pixConIndex='0'] index: 2 [from value]
+ Found item [pixConIndex='0'] index: 1 [from value]
+ Found item [pixConIndex='0'] index: 2 [from value]
+ Found item [pixConIndex='OID: .ccitt.zeroDotZero'] index: 1 [from value]
+ Found item [pixConIndex='OID: .ccitt.zeroDotZero'] index: 2 [from value]
+ Found item [pixConIndex='10.0.0.1'] index: 1 [from value]
+ Found item [pixConIndex='192.168.1.3'] index: 3 [from value]
+ Found item [pixConIndex='1'] index: 1 [from value]
+ Found item [pixConIndex='2'] index: 3 [from value]
+ Found item [pixConIndex='255.255.255.0'] index: 1 [from value]
+ Found item [pixConIndex='255.255.255.0'] index: 3 [from value]
+ Found item [pixConIndex='0'] index: 1 [from value]
+ Found item [pixConIndex='0'] index: 3 [from value]
+ Found item [pixConIndex='65535'] index: 1 [from value]
+ Found item [pixConIndex='65535'] index: 3 [from value]
+ Found data query XML file at 'C:\Apache2\htdocs\cacti/resource/snmp_queries/pix_con.xml'
+ Found data query XML file at 'C:\Apache2\htdocs\cacti/resource/snmp_queries/pix_con.xml'
+ Found data query XML file at 'C:\Apache2\htdocs\cacti/resource/snmp_queries/pix_con.xml'


I do get a graph but it's empty. I probably did something wrong but can't see what I'm missing.

Attached are my pix_con.xml and the graph I get...



Pix_con_test.JPG
 Description:
 Filesize:  110.2 KB
 Viewed:  5670 Time(s)

Pix_con_test.JPG



pix_con.xml
 Description:

Download
 Filename:  pix_con.xml
 Filesize:  1.18 KB
 Downloaded:  290 Time(s)

Back to top
Lux
Cacti User


Joined: 11 Nov 2003
Posts: 195
Location: Luxembourg

PostPosted: Sat Oct 02, 2004 5:24 am    Post subject: Reply with quote

Your XMP file looks a bit strange to me. You've listed completely different OIDs for your index and for your 5minute connections. The index should normally be on the same branch of the OID tree as the variables that you want to graph.

Take another look at the OIDs and ensure that they are the ones that you want to use.

Mike
Back to top
..::BFS::..
Cacti User


Joined: 12 Mar 2004
Posts: 52
Location: Beusichem

PostPosted: Fri Oct 08, 2004 3:47 am    Post subject: Reply with quote

But it should write data to the graphs souldn't it? Maybe useless data but as you can see there's no data at all in de graphs.
Back to top
svenu_ind



Joined: 25 Nov 2004
Posts: 3

PostPosted: Thu Nov 25, 2004 4:27 pm    Post subject: Informational/HOWTO's Reply with quote

Hi
I have followed the instructions mentioned by you. After the step6 i.e After adding the graph template to the data query . When I checked the data associated templates.

There was a warning message

"variable passed to each () is not an array or object in /var/www/html/cacti/data queries.php"

When I try to add device selecting the device I created it gives me the
same error.

Any Clue ?

Please help
Back to top
monachus



Joined: 06 Sep 2004
Posts: 30
Location: New York, NY

PostPosted: Sat Dec 11, 2004 8:14 pm    Post subject: Detailed HOW-TO for XML/Data Queries Reply with quote

I wrote this today to better document the steps I had to take to create (and understand) a Data Query and the subsequent objects. This is for my company, so that others can do it without having to unravel the steps. I did it for an Alteon AceDirector, which is the other reason I'm posting it - there seems to be an absence of Alteon information up here.

My thanks to Lux for the original How-To, and to whomever wrote the Cacti Manual for the snippets I jacked from there.

I hope that it's useful to you all.



Cacti_Data_Queries.zip
 Description:
Detailed docs on XML Data Queries and Cacti. Contains a single MS-Word document.

Download
 Filename:  Cacti_Data_Queries.zip
 Filesize:  13.78 KB
 Downloaded:  1090 Time(s)

Back to top
Guest






PostPosted: Wed Dec 22, 2004 11:32 am    Post subject: Reply with quote

Thanks monachus and everyone else. Really nice work.
Back to top
MagnaChef
Cacti User


Joined: 25 Nov 2003
Posts: 148
Location: Buffalo, NY

PostPosted: Thu Mar 24, 2005 11:57 am    Post subject: Reply with quote

I have a question similar to one that was previously asked. I am trying to monitor a Novell proxy server. Specifically, I need to monitor the variable proxyStatsConnectActiveConnections. Seeing as this is a general service on the machine, there is no indexing - the index is always zero. Is there a way that I can just define the <oid_index> to be zero, and then put the oid that I need to poll?

Thanks.
Back to top
monachus



Joined: 06 Sep 2004
Posts: 30
Location: New York, NY

PostPosted: Thu Mar 24, 2005 11:59 am    Post subject: SNMP w/ no Index Reply with quote

Use "Get SNMP Data" as your Data Query Method instead of "Get SNMP Data (Indexed)" and put in the OID. You should be able to do this without writing a whole gnarly script and XML template.
Back to top
MagnaChef
Cacti User


Joined: 25 Nov 2003
Posts: 148
Location: Buffalo, NY

PostPosted: Thu Mar 24, 2005 1:41 pm    Post subject: Reply with quote

Is there a HOWTO for adding a data source that will only poll a specific OID. I tried adding a data source named "Get SNMP Data" instead of "Get SNMP Data (indexed)" but all that shows up in the drop down is Get SNMP Data (indexed)"
Back to top
monachus



Joined: 06 Sep 2004
Posts: 30
Location: New York, NY

PostPosted: Thu Mar 24, 2005 3:18 pm    Post subject: Reply with quote

Data Template

1. Create a Data template for proxyStatsConnectActiveConnections. Call it "Proxy DT - Active Connections"
2. Set the Name to "|host_description| - Active Connections"
3. Set the Data Input Method to "Get SNMP Data"
4. Set the Internal Data Source Name to "num_conns"
5. Give it a Max of 200000 (or whatever)
6. Make it a Gauge
7. Save
8. After saving, you'll have new options. Enter your OID into the OID field
9. Click Save

Graph Template

1. Create a Graph Template. Call it "Proxy GT - Active Connections"
2. Set the Name to "|host_description| - Active Connections"
3. Save
4. In the screen that follows, select "Add" from Graph Template Items in the top right.
5. In the next screen, choose your DT from above.
6. Add some colors and stuff for the graph output
7. Save

If you have a Host Template for this type of device, you can add the GT you just created to the Host Template and it will always appear. Alternatively, just go to your device and add the GT to the Device Information screen. When you go to "Create Graphs for this Host," you should have the Graph Template there. Check it and save.

Ta Da!

It should be noted that I'm _not_ a Cacti expert. I get my information from looking at the scripts that have been provided and figuring out the rest. It's not that difficult, and I encourage everyone to spend a few hours looking over what already works. It helps to name your templates with a name that says what they are (GT, DT, HT), so that it clarifies which your adding to what.
Back to top
MagnaChef
Cacti User


Joined: 25 Nov 2003
Posts: 148
Location: Buffalo, NY

PostPosted: Thu Mar 24, 2005 4:22 pm    Post subject: Reply with quote

Thank You very much!

This was exactly what I was looking for!

-Dan
Back to top
ajeskey
Cacti User


Joined: 28 Mar 2005
Posts: 93
Location: Boston, MA

PostPosted: Thu Apr 07, 2005 7:04 pm    Post subject: Reply with quote

Does anyone have a copy of that word doc? I am hoping that it will help me with getting the graph to actualy populate.
Back to top
monachus



Joined: 06 Sep 2004
Posts: 30
Location: New York, NY

PostPosted: Thu Apr 07, 2005 9:47 pm    Post subject: Reply with quote

download the zip file and extract it. the word doc is inside.
Back to top
ajeskey
Cacti User


Joined: 28 Mar 2005
Posts: 93
Location: Boston, MA

PostPosted: Thu Apr 07, 2005 9:49 pm    Post subject: Reply with quote

when ever i click on the download link i just get prompted to save the download.php

I wouldn't have asked if i could just click the link
Back to top
monachus



Joined: 06 Sep 2004
Posts: 30
Location: New York, NY

PostPosted: Thu Apr 07, 2005 9:50 pm    Post subject: Reply with quote

something's wrong w/ your browser. email me directly at <snipped> and i'll send you the file.

Last edited by monachus on Thu Apr 07, 2005 10:19 pm; edited 1 time in total
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Informational/HOWTO's All times are GMT - 5 Hours
Goto page Previous  1, 2, 3, 4  Next
Page 2 of 4

 



Powered by phpBB © 2001, 2005 phpBB Group