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
 
Post new topic   Reply to topic    Cacti Forum Index -> Informational/HOWTO's
Author Message
tafirol



Joined: 22 May 2005
Posts: 15

PostPosted: Thu Jul 07, 2005 12:49 pm    Post subject: Reply with quote

I will try to clarify what I´m looking for ; )
the thing is that I have an script running and I can use only one index by script, no problem there. But, now I have get information from 2 indexes, and I have no idea of what I have to write into the script. I hope that you understand my point.

thanks in advance,

Tafi ROL
Back to top
tafirol



Joined: 22 May 2005
Posts: 15

PostPosted: Wed Jul 13, 2005 6:39 am    Post subject: Reply with quote

Well I read the documentation and but the aid of others posts I could obtain it.

thanks...
Back to top
monachus



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

PostPosted: Wed Jul 13, 2005 9:59 am    Post subject: Reply with quote

please post your discovery here, so that the next person to have the question knows where to look. nothing is more frustrating than having a question, finding someone else who had the question, and then finding a post that says, "i figured it out," without any further information.

tx.
Back to top
tafirol



Joined: 22 May 2005
Posts: 15

PostPosted: Fri Jul 15, 2005 7:40 pm    Post subject: Reply with quote

Is true ....
Here is my script, I hope that it helps you.

releated posts
http://forums.cacti.net/viewtopic.php?t=7710

Greetings




gx_perf_path_fe.xml
 Description:

Download
 Filename:  gx_perf_path_fe.xml
 Filesize:  1.74 KB
 Downloaded:  307 Time(s)

Back to top
Alives
Cacti User


Joined: 11 Jul 2005
Posts: 103

PostPosted: Mon Jul 18, 2005 10:29 am    Post subject: Reply with quote

I am having trouble getting this to work. I have followed the document very closely and even retried creating everything about 3 times. I am still getting the following error when i try to add the Data Query to the Device under the device configuration area. Any ideas?

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

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

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

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

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

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

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

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

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

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

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

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


I tried snmpwalk and got good responses for these OIDs...

Code:
[cacti@hector cacti]$ snmpwalk -c <community> 10.10.10.20 .1.3.6.1.4.1.1872.2.1.5.2.1.1
SNMPv2-SMI::enterprises.1872.2.1.5.2.1.1.1 = INTEGER: 1
SNMPv2-SMI::enterprises.1872.2.1.5.2.1.1.2 = INTEGER: 2
SNMPv2-SMI::enterprises.1872.2.1.5.2.1.1.3 = INTEGER: 3
SNMPv2-SMI::enterprises.1872.2.1.5.2.1.1.4 = INTEGER: 4
[cacti@hector cacti]$ snmpwalk -c <community> 10.10.10.20 .1.3.6.1.4.1.1872.2.1.5.2.1.2
SNMPv2-SMI::enterprises.1872.2.1.5.2.1.2.1 = IpAddress: 10.10.10.31
SNMPv2-SMI::enterprises.1872.2.1.5.2.1.2.2 = IpAddress: 10.10.10.26
SNMPv2-SMI::enterprises.1872.2.1.5.2.1.2.3 = IpAddress: 10.10.10.27
SNMPv2-SMI::enterprises.1872.2.1.5.2.1.2.4 = IpAddress: 10.10.10.32
[cacti@hector cacti]$ snmpwalk -c <community> 10.10.10.20 .1.3.6.1.4.1.1872.2.1.5.2.1.12
SNMPv2-SMI::enterprises.1872.2.1.5.2.1.12.1 = ""
SNMPv2-SMI::enterprises.1872.2.1.5.2.1.12.2 = ""
SNMPv2-SMI::enterprises.1872.2.1.5.2.1.12.3 = ""
SNMPv2-SMI::enterprises.1872.2.1.5.2.1.12.4 = ""
[cacti@hector cacti]$ snmpwalk -c <community> 10.10.10.20 .1.3.6.1.4.1.1872.2.1.8.2.5.1.2
SNMPv2-SMI::enterprises.1872.2.1.8.2.5.1.2.1 = Gauge32: 0
SNMPv2-SMI::enterprises.1872.2.1.8.2.5.1.2.2 = Gauge32: 130
SNMPv2-SMI::enterprises.1872.2.1.8.2.5.1.2.3 = Gauge32: 134
SNMPv2-SMI::enterprises.1872.2.1.8.2.5.1.2.4 = Gauge32: 0
Back to top
monachus



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

PostPosted: Mon Jul 18, 2005 10:37 am    Post subject: Reply with quote

walking the OIDs has nothing to do with the errors you're posting. i believe that those errors mean that your data query is broken. if you go to the data query, you should see the line "Successfully located XML file" in green under the query information. It's as though the data query that you're adding doesn't have any information in it, which is what's creating those errors.
Back to top
Alives
Cacti User


Joined: 11 Jul 2005
Posts: 103

PostPosted: Mon Jul 18, 2005 11:21 am    Post subject: Reply with quote

I think my Data Query is ok... as well as the data source. Can you see any problems in it? I also pasted my xml file. I am new to cacti but i think i have gotten the hang of it... this xml snmp query stuff is confusing me though. I have successfully gotten it to work using perl scripts to check nsclient on windows hosts.

Code:
[cacti@hector cacti]$ cat /var/www/html/cacti/resource/snmp_queries/alteon_real_servers.xml
<query>
  <name>Get Alteon Real Server Information</name>
  <index_order_type>numeric</index_order_type>
  <oid_index>.1.3.6.1.4.1.1872.2.1.5.2.1.1</oid_index>

  <fields>
    <slbCurCfgRealServerIndex>
      <name>Number</name>
      <method>walk</method>
      <source>value</source>
      <direction>input</direction>
      <oid>.1.3.6.1.4.1.1872.2.1.5.2.1.1</oid>
    </slbCurCfgRealServerIndex>
    <slbCurCfgRealServerIpAddr>
          <name>IP Address</name>
          <method>walk</method>
          <source>value</source>
          <direction>input</direction>
          <oid>.1.3.6.1.4.1.1872.2.1.5.2.1.2</oid>
        </slbCurCfgRealServerIpAddr>

        <slbCurCfgRealServerName>
          <name>Name</name>
          <method>walk</method>
          <source>value</source>
          <direction>input</direction>
          <oid>.1.3.6.1.4.1.1872.2.1.5.2.1.12</oid>
        </slbCurCfgRealServerName>

        <slbStatRServerCurrSessions>
          <name>Current Sessions</name>
          <method>walk</method>
          <source>value</source>
          <direction>output</direction>
          <oid>.1.3.6.1.4.1.1872.2.1.8.2.5.1.2</oid>
        </slbStatRServerCurrSessions>
  </fields>
</query>



1.PNG
 Description:
Data Query
 Filesize:  17.06 KB
 Viewed:  6208 Time(s)

1.PNG



2.PNG
 Description:
Associated Graph Template (under Data Query)
 Filesize:  20.7 KB
 Viewed:  6208 Time(s)

2.PNG



3.PNG
 Description:
Data Template
 Filesize:  54.19 KB
 Viewed:  6208 Time(s)

3.PNG


Back to top
monachus



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

PostPosted: Mon Jul 18, 2005 11:48 am    Post subject: Reply with quote

Change your Data Query to "Get SNMP Data (Indexed)" instead of Script data.
Back to top
Alives
Cacti User


Joined: 11 Jul 2005
Posts: 103

PostPosted: Mon Jul 18, 2005 11:50 am    Post subject: Reply with quote

so sorry about that
Back to top
monachus



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

PostPosted: Mon Jul 18, 2005 12:05 pm    Post subject: Reply with quote

Does it work now?
Back to top
Alives
Cacti User


Joined: 11 Jul 2005
Posts: 103

PostPosted: Mon Jul 18, 2005 12:10 pm    Post subject: Reply with quote

yes that was it... naturally i feel stupid for overlooking such a vital selection...
Back to top
monachus



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

PostPosted: Mon Jul 18, 2005 12:25 pm    Post subject: Reply with quote

pish posh. a second set of eyes is always a good thing. you'd been staring at it for hours, so something like that is easy to overlook. good job on including the screenshots - it made it possible for me to help.

i'm glad it worked!
Back to top
moe_szyslak



Joined: 21 Jul 2005
Posts: 46
Location: Germany

PostPosted: Wed Aug 03, 2005 1:37 am    Post subject: Reply with quote

Hello to all,

I tried the steps for making a SNMP query for cacti, but I made somewhere a mistake. the result is, thar no rra files are created and there is no image at the graph management.

I think the data query and the xml are correct, because I can see the information at device->associated data queries->verbose query.

About the combination about the Templates I am not sure.

Does anyone has an idea?


Thx
Moe
Back to top
monachus



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

PostPosted: Wed Aug 03, 2005 1:52 am    Post subject: Reply with quote

the steps in the how-to are complete. if you made a mistake and missed something, your best bet is to start over and go through it with greater care.
Back to top
moe_szyslak



Joined: 21 Jul 2005
Posts: 46
Location: Germany

PostPosted: Wed Aug 03, 2005 7:03 am    Post subject: Reply with quote

I have done evrything from the howto. I differed at No. 6, there ich made a graph to an existing host. Everything runs well at 'verbose query' - 'create graph for this host' etc.

But when I look at Graph Management I got the message 'open ...79.rrd - No such file or directory' and the RRA file is not in the directory.

A question about the field Data Query: Must there any entries at 'Associated Graph Templates' - 'Suggested Values' ?


Moe
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
Page 4 of 4

 



Powered by phpBB © 2001, 2005 phpBB Group