Friendly names in XML query

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

Moderators: Developers, Moderators

Post Reply
mooneyn
Posts: 33
Joined: Tue Aug 21, 2012 2:19 am

Friendly names in XML query

Post by mooneyn »

Hi

I have a working SNMP data query (index) for the I3IC MIB (Interactive Intelligence). This MIB is basically a table of processes/subsystems and their CPU/memory/threads etc. Fairly standard SNMP stuff.

The issue is that the index of the table (i3IcSubsysInfoIndex) is numeric and nowhere in the table does it give the "friendly" name of each process/subsystem. Rather, those friendly names are listed in the description within the MIB. Basically it's just a set ID that is a little bit like process ID, except it never changes.

As such the title of my graphs for "StatServer" CPU just says "CPU Usage - 19". I want it to say “CPU Usage – StatServer” by looking up that 19 == StatServer.

How can substitute the "friendly" name in my XML file automatically? I know i could enter it in as an input during graph creation but there are 31 processes and many many servers to consider...

These are the friendly names:
Table entry index. Each value represents an Interaction Center subsystem. 1 = Notifier, 2 = Switchover, 3 = FileMonitor, 4 = DSServer, 5 = Mail Account Monitor, 6 = AdminServer, 7 = AccServer, 8 = Post Office, 9 = Reco Subsystem, 10 = Compressor Manager, 11 = DataManager, 12 = Tracker Tran Server, 13 = Tracker Server, 14 = Recorder Tran Server, 15 = Recorder Server, 16 = IPDBServer, 17 = PagingServer, 18 = HostServer, 19 = StatServer, 20 = OutOfProcCustomDLL, 21 = WebProcessor, 22 = ClientServices, 23 = AcdServer, 24 = AlertServer, 25 = IPServer, 26 = VPIM Receiver, 27 = FaxServer, 28 = IP, 29 = TSServer, 30 = SMSServer, 31 = EMS Server

My XML file is attached.

Thanks in advance.
Attachments
i3ic.xml
(1.8 KiB) Downloaded 89 times
victorantunes
Cacti User
Posts: 111
Joined: Fri Sep 28, 2012 6:52 pm

Re: Friendly names in XML query

Post by victorantunes »

Here's one thing that caught my attention:

under <interface>

Code: Select all

<oid_index>.1.3.6.1.4.1.2793.2.2.1.1</oid_index>
and under <i3IcSubsysInfoIndex>

Code: Select all

<oid>.1.3.6.1.4.1.2793.2.2.1.1.1</oid>
Please correct me if I'm wrong, but shouldn't both those fields have the same value (.1.3.6.1.4.1.2793.2.2.1.1.1)?
mooneyn
Posts: 33
Joined: Tue Aug 21, 2012 2:19 am

Re: Friendly names in XML query

Post by mooneyn »

Seems to have the same results no matter which OID i use.

I think the problem is that hte names i want substituted in to described the subsystem index, just arn't in the SNMP results.

I am wondering if the only want to put the names i want in the index is to use a script query and add the names as part of the script's logic.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Friendly names in XML query

Post by gandalf »

You already consulted the walkthroughs at 1st link of my sig?
For more help, we definitively need a print of a snmpwalk of that very table
R.
mooneyn
Posts: 33
Joined: Tue Aug 21, 2012 2:19 am

Re: Friendly names in XML query

Post by mooneyn »

Yes have gone through the guides and have other working snmp queries setup, so i'm good on that side. Been using cacti for years :)

Attached is the the output of the snmpwalk on .1.3.6.1.4.1.2793 against my server.

As you can see, the subsystem names are not in there anywhere. Instead, the vendor just uses an index of 1 .. 47. I would like to the put the real subsystem names in there so its easy to work out which graph belongs to which subsystem. The subsystem names are in my first post.

I have also attached a graph so you can see what i'm talking about. I want to be able to title my graphs as "Server1 - Memory Utilisation - Notifier Subsystem" instead of "Server1 - Memory Utilisation - 1"
Attachments
graph.png
graph.png (24.99 KiB) Viewed 1120 times
snmp.txt
(27.34 KiB) Downloaded 63 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Friendly names in XML query

Post by gandalf »

I hope I do understand better now.
So the identifiers you want to use as a replacement are NOT part of ANY snmp table. You simply have a list (or a text file) that shows those identifiers. Right?

Well, ugly. Currently, the only solution would be to use a Script Query. You can make it translate stuff from a table or from strings within that very script. Again, ugly stuff.

We have a new feature being planned for some later release which allows for sth like a "rewrite" as part of an XML. That sound slike a better fit. But it will not come soon. In case your php skills are good and you like to spent some time on this: The code for the new feature is already part of SVN/cactimain. Search for "rewrite" should point you to some code that you may want to apply as a custom patch once you get it ripped out. Don't expect this to be a quick hack.
R.
victorantunes
Cacti User
Posts: 111
Joined: Fri Sep 28, 2012 6:52 pm

Re: Friendly names in XML query

Post by victorantunes »

gandalf wrote:I hope I do understand better now.
So the identifiers you want to use as a replacement are NOT part of ANY snmp table. You simply have a list (or a text file) that shows those identifiers. Right?
R.
I think it's a little more than a list or text file. Apparently they're actually quite well-defined.

Check this: http://ipmsupport.solarwinds.com/mibs/I ... sInfoIndex

Perhaps it helps a tiny bit?
buzzsurfr
Posts: 1
Joined: Fri Oct 19, 2012 8:31 am

Re: Friendly names in XML query

Post by buzzsurfr »

I am also having issues getting Data Query input fields to show the value and not the raw value. I am working on a Data Query for a Radware (load-balancing) appliance that pulls info from each farm. While it does correctly get all the values, it only shows the raw value of the other fields (Admin Status, Oper Status, etc.).
Image

Based off of the mib, I should see different values for the Oper Status (active and notInService):

Code: Select all

rsWSDFarmOperStatus OBJECT-TYPE
    SYNTAX INTEGER {
        active(1),
        notInService(2)
      }
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
      "Farm status. Active - farm is active. NotInService - service is not
       available."
    ::= {rsWSDFarmEntry 23}
I know that somewhere in Cacti this functionality is supported, because I get the "string" values on the Status & Type field of an Interfaces query.
Image

And the corresponding entry for Status from IF-MIB:

Code: Select all

   ifOperStatus OBJECT-TYPE
       SYNTAX  INTEGER {
                   up(1),        -- ready to pass packets
                   down(2),
                   testing(3),   -- in some test mode
                   unknown(4),   -- status can not be determined
                                 -- for some reason.
                   dormant(5),
                   notPresent(6),    -- some component is missing
                   lowerLayerDown(7) -- down due to state of
                                     -- lower-layer interface(s)
               }
       MAX-ACCESS  read-only
       STATUS      current
       DESCRIPTION
               "The current operational state of the interface.  The
               testing(3) state indicates that no operational packets
               can be passed.  If ifAdminStatus is down(2) then
               ifOperStatus should be down(2).  If ifAdminStatus is
               changed to up(1) then ifOperStatus should change to
               up(1) if the interface is ready to transmit and
               receive network traffic; it should change to
               dormant(5) if the interface is waiting for external
               actions (such as a serial line waiting for an incoming
               connection); it should remain in the down(2) state if
               and only if there is a fault that prevents it from
               going to the up(1) state; it should remain in the
               notPresent(6) state if the interface has missing
               (typically, hardware) components."
       ::= { ifEntry 8 }
I have the MIBs in the /usr/share/snmp/mibs folder and they are named correctly. A walk of the Oper Status (with MIB installed) shows the value and the raw:

Code: Select all

[root@######## ~]# snmpwalk -Cc -v2c -c xxxxxxxx ###.###.###.### WSD-MIB::rsADFarmOperStatus
WSD-MIB::rsADFarmOperStatus."AveFarm443 - Commute" = INTEGER: active(1)
WSD-MIB::rsADFarmOperStatus."Ave Test Farm 443" = INTEGER: active(1)
WSD-MIB::rsADFarmOperStatus."AveFarm80 - Access" = INTEGER: notInService(2)
WSD-MIB::rsADFarmOperStatus."AveFarm443 - Access" = INTEGER: notInService(2)
Where else can I look for the solution. How does Cacti normally poll that, and does it use MIBs kept somewhere else?

(First-time poster here. Be gentle.)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest