Custom template not working

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

Moderators: Developers, Moderators

User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

JDP wrote:I do see that OID in the poller cache for each item I'm looking for.
Fine
Here's some info you asked for:

We'll work with one server here, it's host ID is 50
The DS that would be in question for it are 1872, 1873, 1874, 1875, 1876 - the server's onboard temperature sensors and 1870 & 1871, which would be the drive array statistics.
We may need this later for testing
(Off-topic: I assume that if I want the OID values to return their string counterparts I'll have to add those MIBs to NetSNMP, right?)
No, cacti does not rely on MIBs, only pure ASN.1 OIDs. The MIBs are useful for you if you want to see texts instead of OIDs.
Ahhh, wait one second.
When I ran cactid as you requested, as it got to my particular OIDs it shows:
CACTID: Host[50] DS[1872] SNMP: v2: MSPMOM02, dsname: TemperatureC, oid: .1.3.6.1.4.1.232.6.2.6.8.1.4.1, value: U
CACTID: Host[50] DS[1873] SNMP: v2: MSPMOM02, dsname: TemperatureC, oid: .1.3.6.1.4.1.232.6.2.6.8.1.4.2, value: U
CACTID: Host[50] DS[1874] SNMP: v2: MSPMOM02, dsname: TemperatureC, oid: .1.3.6.1.4.1.232.6.2.6.8.1.4.3, value: U
CACTID: Host[50] DS[1875] SNMP: v2: MSPMOM02, dsname: TemperatureC, oid: .1.3.6.1.4.1.232.6.2.6.8.1.4.4, value: U
CACTID: Host[50] DS[1876] SNMP: v2: MSPMOM02, dsname: TemperatureC, oid: .1.3.6.1.4.1.232.6.2.6.8.1.4.5, value: U
CACTID: Host[50] DS[1872] SNMP: v2: MSPMOM02, dsname: TemperatureThresh, oid: .1.3.6.1.4.1.232.6.2.6.8.1.5.1, value: U
CACTID: Host[50] DS[1873] SNMP: v2: MSPMOM02, dsname: TemperatureThresh, oid: .1.3.6.1.4.1.232.6.2.6.8.1.5.2, value: U
CACTID: Host[50] DS[1874] SNMP: v2: MSPMOM02, dsname: TemperatureThresh, oid: .1.3.6.1.4.1.232.6.2.6.8.1.5.3, value: U
CACTID: Host[50] DS[1875] SNMP: v2: MSPMOM02, dsname: TemperatureThresh, oid: .1.3.6.1.4.1.232.6.2.6.8.1.5.4, value: U
CACTID: Host[50] DS[1876] SNMP: v2: MSPMOM02, dsname: TemperatureThresh, oid: .1.3.6.1.4.1.232.6.2.6.8.1.5.5, value: U

Now, I ran snmpget on that oid and server, and it came up with no such OID.
I played around, and found out that .1.3.6.1.4.1.232.6.2.6.8.1.4.1 isn't the right OID, the right OID for that should be .1.3.6.1.4.1.232.6.2.6.8.1.4.0.1 - so it seems to be off.
And I tried it on another host that was showing 0 for data, and that one was timing out, so I'll have to look into that one.
Now we get it!
As for crons though, there's only one, I've verified it. Nothing else is triggering it. That log may have been my fault, I waited until it was completed, then manually ran it with DEBUG on.
Bah, so we have to look into the runtime issue later (with a full debug)
So now it seems like I've half-screwed up my templates, or Cacti can figure out the info well enough to poll the outputs (Like the Sensor ID #), but not the inputs (I.E. the actual temperatures)
Do you have any idea where I should be going with this?

To give an idea of the type of template I'm trying to create (See actual templates in first post) here's an SNMPwalk of the root of the TemperatureTable:
(.1.3.6.1.4.1.232.6.2.6.8)
CPQHLTH-MIB::cpqHeTemperatureChassis.0.1 = INTEGER: 0
CPQHLTH-MIB::cpqHeTemperatureChassis.0.2 = INTEGER: 0
CPQHLTH-MIB::cpqHeTemperatureChassis.0.3 = INTEGER: 0
CPQHLTH-MIB::cpqHeTemperatureChassis.0.4 = INTEGER: 0
CPQHLTH-MIB::cpqHeTemperatureChassis.0.5 = INTEGER: 0
CPQHLTH-MIB::cpqHeTemperatureIndex.0.1 = INTEGER: 1
CPQHLTH-MIB::cpqHeTemperatureIndex.0.2 = INTEGER: 2
CPQHLTH-MIB::cpqHeTemperatureIndex.0.3 = INTEGER: 3
CPQHLTH-MIB::cpqHeTemperatureIndex.0.4 = INTEGER: 4
CPQHLTH-MIB::cpqHeTemperatureIndex.0.5 = INTEGER: 5
CPQHLTH-MIB::cpqHeTemperatureLocale.0.1 = INTEGER: ioBoard(5)
CPQHLTH-MIB::cpqHeTemperatureLocale.0.2 = INTEGER: cpu(6)
CPQHLTH-MIB::cpqHeTemperatureLocale.0.3 = INTEGER: cpu(6)
CPQHLTH-MIB::cpqHeTemperatureLocale.0.4 = INTEGER: powerSupply(10)
CPQHLTH-MIB::cpqHeTemperatureLocale.0.5 = INTEGER: system(3)
CPQHLTH-MIB::cpqHeTemperatureCelsius.0.1 = INTEGER: 43
CPQHLTH-MIB::cpqHeTemperatureCelsius.0.2 = INTEGER: 44
CPQHLTH-MIB::cpqHeTemperatureCelsius.0.3 = INTEGER: 46
CPQHLTH-MIB::cpqHeTemperatureCelsius.0.4 = INTEGER: 32
CPQHLTH-MIB::cpqHeTemperatureCelsius.0.5 = INTEGER: 27
CPQHLTH-MIB::cpqHeTemperatureThreshold.0.1 = INTEGER: 63
CPQHLTH-MIB::cpqHeTemperatureThreshold.0.2 = INTEGER: 85
CPQHLTH-MIB::cpqHeTemperatureThreshold.0.3 = INTEGER: 85
CPQHLTH-MIB::cpqHeTemperatureThreshold.0.4 = INTEGER: 48
CPQHLTH-MIB::cpqHeTemperatureThreshold.0.5 = INTEGER: 41
CPQHLTH-MIB::cpqHeTemperatureCondition.0.1 = INTEGER: ok(2)
CPQHLTH-MIB::cpqHeTemperatureCondition.0.2 = INTEGER: ok(2)
CPQHLTH-MIB::cpqHeTemperatureCondition.0.3 = INTEGER: ok(2)
CPQHLTH-MIB::cpqHeTemperatureCondition.0.4 = INTEGER: ok(2)
CPQHLTH-MIB::cpqHeTemperatureCondition.0.5 = INTEGER: ok(2)
CPQHLTH-MIB::cpqHeTemperatureThresholdType.0.1 = INTEGER: caution(9)
CPQHLTH-MIB::cpqHeTemperatureThresholdType.0.2 = INTEGER: caution(9)
CPQHLTH-MIB::cpqHeTemperatureThresholdType.0.3 = INTEGER: caution(9)
CPQHLTH-MIB::cpqHeTemperatureThresholdType.0.4 = INTEGER: caution(9)
CPQHLTH-MIB::cpqHeTemperatureThresholdType.0.5 = INTEGER: caution(9)
I see two possible approaches.
1) Simply append the missing 0 to the OIDs used in your XML file
2) Work with a "two dimensional index", e.g. instead of index = {0, 1, 2, 3 ...} take index ={ 0.1, 0.2, 0.3, ...}
The last solution will be needed, if the index is really two dimensional. But that depends on the MIB definition. Else, approach 1) is easier to implement
Reinhard
User avatar
JDP
Posts: 23
Joined: Mon Aug 09, 2004 10:26 am
Location: Minneapolis, MN
Contact:

Post by JDP »

Ah, wouldn't ya know it, adding the 0 makes it work fine!

Now, one more question, about the whole query_dataquery fields. The sensor location for each graph is called cpqHETempLocale in the XML file.
So in the graph template I tried to add "|host_description| - Compaq Sensor Temp - |query_cpqHETempLocale|" but that didn't work, so I'm confused. Though now I'm going to go try sdomething, and I bet it will work. Oi.

Also, if I want to have "CPU 1" on the graph instead of the interger 5 which represents it, how best to do that? Since the sensor name is in the MIB
[b]Jeremy D. Pavleck[/b]
[email]jeremy@NOSPAMpavleck.com[/email]
Various code and ramblings over at my site, [url=http://www.pavleck.com/]Pavleck.Com[/url]
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please post your XML. In brevity, all field names to be used for text output must be of type

Code: Select all

<direction>output</direction>
as described in the last howto of my signature.
Reinhard
User avatar
JDP
Posts: 23
Joined: Mon Aug 09, 2004 10:26 am
Location: Minneapolis, MN
Contact:

Post by JDP »

lvm wrote:Please post your XML. In brevity, all field names to be used for text output must be of type

Code: Select all

<direction>output</direction>
as described in the last howto of my signature.
Reinhard
Actually, I got it - needed to create new graphs though in order for it to go into effect. So we're good to go now. Though I'll probably ask about multi-dimensional arrays later!
[b]Jeremy D. Pavleck[/b]
[email]jeremy@NOSPAMpavleck.com[/email]
Various code and ramblings over at my site, [url=http://www.pavleck.com/]Pavleck.Com[/url]
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Multi-dimensional stuff was already solved, see http://forums.cacti.net/viewtopic.php?t=13089
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests