port descreet in windowsXp

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
lisa_parma
Posts: 18
Joined: Wed Jan 18, 2006 2:55 am
Location: indonesia
Contact:

port descreet in windowsXp

Post by lisa_parma »

hi all,
i want to get the valu/satatus of my descret port...
but i don't how???
that cacti support for that????

this is the axample of oid port descret...
the return value is string -> clear or alarm

.1.3.6.1.4.1.2682.1.2.5.1.5.99.1.2.1 = STRING: "Test2"
.1.3.6.1.4.1.2682.1.2.5.1.5.99.1.2.2 = STRING: "Test1"
.1.3.6.1.4.1.2682.1.2.5.1.5.99.1.2.3 = STRING: "Test2"
.1.3.6.1.4.1.2682.1.2.5.1.5.99.1.2.4 = ""
.1.3.6.1.4.1.2682.1.2.5.1.5.99.1.2.5 = ""
.1.3.6.1.4.1.2682.1.2.5.1.5.99.1.2.6 = ""
.1.3.6.1.4.1.2682.1.2.5.1.5.99.1.2.7 = ""
.1.3.6.1.4.1.2682.1.2.5.1.5.99.1.2.8 = ""
.1.3.6.1.4.1.2682.1.2.5.1.5.99.1.2.9 = ""
.1.3.6.1.4.1.2682.1.2.5.1.5.99.1.2.10 = ""

.1.3.6.1.4.1.2682.1.2.5.1.6.99.1.2.1 = STRING: "Alarm"
.1.3.6.1.4.1.2682.1.2.5.1.6.99.1.2.2 = STRING: "Clear"
.1.3.6.1.4.1.2682.1.2.5.1.6.99.1.2.3 = STRING: "Clear"
.1.3.6.1.4.1.2682.1.2.5.1.6.99.1.2.4 = STRING: "Clear"
.1.3.6.1.4.1.2682.1.2.5.1.6.99.1.2.5 = STRING: "Clear"
.1.3.6.1.4.1.2682.1.2.5.1.6.99.1.2.6 = STRING: "Clear"
.1.3.6.1.4.1.2682.1.2.5.1.6.99.1.2.7 = STRING: "Clear"
.1.3.6.1.4.1.2682.1.2.5.1.6.99.1.2.8 = STRING: "Clear"
.1.3.6.1.4.1.2682.1.2.5.1.6.99.1.2.9 = STRING: "Clear"
.1.3.6.1.4.1.2682.1.2.5.1.6.99.1.2.10 = STRING: "Clear"

please help me...
thx b4 :D
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

This does not belong in the Informational/HOWTO's. Moving to general

take a read: http://forums.cacti.net/viewtopic.php?t=11647
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

This is handled in the last link of my signature. But wait: this covers "graphable numeric data" only. So you would have to translate the status information by some wrapper script into numbers, e.g. 0 for "down" and 1 for "up" to get them graphed
Reinhard
lisa_parma
Posts: 18
Joined: Wed Jan 18, 2006 2:55 am
Location: indonesia
Contact:

Post by lisa_parma »

i have follow the instruction in http://forums.cacti.net/viewtopic.php?t=11647 <Ivm signature>

i have create file xml like this:
<pingtarget>
<name>Get NetGuardian Ping Target</name>
<description>Queries a host for a list of ngd ping target's</description>
<index_order_type>numeric</index_order_type>
<oid_index>.1.3.6.1.4.1.2682.1.2.5.1.4</oid_index>

<fields>
<NGDIndexPT>
<name>Index</name>
<method>walk</method>
<source>index</source>
<direction>input</direction>
</NGDIndexPT>
<OperatingDescrPT>
<name>Description</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.2682.1.2.5.1.5</oid>
</OperatingDescrPT>
<OperatingPT>
<name>Ping Target</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.2682.1.2.2.1.5</oid>
</OperatingPT>
</fields>
</pingtarget>

but when i try to add my dataQuery that i have build to my device,
this error is apper:

Notice: Undefined index: arg_index in C:\xampp\htdocs\cacti\lib\data_query.php on line 98

Notice: Undefined index: script_path in C:\xampp\htdocs\cacti\lib\data_query.php on line 98

Notice: Undefined index: arg_query in C:\xampp\htdocs\cacti\lib\data_query.php on line 109

Notice: Undefined index: query_name in C:\xampp\htdocs\cacti\lib\data_query.php on line 109

Notice: Undefined index: script_path in C:\xampp\htdocs\cacti\lib\data_query.php on line 109

Notice: Undefined index: arg_query in C:\xampp\htdocs\cacti\lib\data_query.php on line 109

Notice: Undefined index: query_name in C:\xampp\htdocs\cacti\lib\data_query.php on line 109

Notice: Undefined index: script_path in C:\xampp\htdocs\cacti\lib\data_query.php on line 109

Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\cacti\lib\data_query.php:98) in C:\xampp\htdocs\cacti\host.php on line 129

but when i try to add another data query<that have been in default cacti> in my device... it's no error.
what should i do?
thx b4:)
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Yep, should have been more precise. My howto in fact describes graphing of indexed values (similar to yours), but the values must be numeric. Theses values are stored into rrdtool files (rrd's). There's no chance to store STRING values in rrd files.
So, when querying your target for STATUS data, the result is of STRING type. To store it, you'll have to convert it into numeric type (as I stated above). This may be done by some wrapper script.
And here's the problem: It is not possible to invoke a wrapper script, when building a SNMP Data Query.
But there's a solution to this: It is possible, to invoke a script directly. This must implement the SNMP query to get the data and must perform the numerical translation. In cacti lingo, this is called a Script Query. You must provide the index information to the script to make it query the correct index.
The syntax is not very different, but find a description at http://www.cacti.net/downloads/docs/htm ... y_xml.html for more help
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests