With SSLogger we need to retrieve OID
hpSystemAirCurrentTemp | 1.3.6.1.4.1.11.2.14.11.1.2.8.1.1.3 | 0 | 26C | Octet String |
read-only |
It is an Octet String and SSlogger gets values like "32.38.43" while the real value is "28C"
How can we tell SSLogger to convert the value to a string or to an integer?
Here is the full MIB:
hpSystemAirCurrentTemp OBJECT-TYPE
SYNTAX OCTET STRING (SIZE (1 .. 6))
ACCESS read-only
STATUS current
DESCRIPTION
"This object gives current temperature of the
system. This is the current temperature given
by the indexed chassis attached temperature
sensor on box."
::= { hpSystemAirTempEntry 3 }
-- 1.3.6.1.4.1.11.2.14.11.1.2.8.1.1.3
Release : 20.2
Component : Spectrum Applications
Unfortunately, this is by design, you will always get in ASCII.
This is covered in this section of the Spectrum guide:
There are no additional settings in the .ssloggerrc file:
You can use the RESTful Web Services API to gather the value of hpSystemAirCurrentTemp (1.3.6.1.4.1.11.2.14.11.1.2.8.1.1.3) OID.
Query all Devices in the distributed environment retrieving the attributes 0x1006e, 0x10001, and 0x5918e45
HTTP GET
http://<OneClick_server>:<port>/spectrum/restful/devices?attr=0x1006e&attr=0x10001&attr=0x5918e45
If you want to query a specific device (instead of all devices), then you have perform the HTTP POST instead of the HTTP GET.
You can use any utility to run RESTful query. I will use the WizTools for this demonstration:
1) In the URL, supply the following:
http://<OneClick_server>:<port>/spectrum/restful/models
In Method TAB, select POST
2) In the Body TAB, select application/xml; charset=UTF-8
and paste the following:
<?xml version="1.0" encoding="UTF-8"?>
<rs:model-request throttlesize="1000"
xmlns:rs="http://www.ca.com/spectrum/restful/schema/request"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ca.com/spectrum/restful/schema/request ../../../xsd/Request.xsd">
<rs:target-models>
<rs:model mh="0x1000f72" />
</rs:target-models>
<rs:requested-attribute id="0x10052"/>
<rs:requested-attribute id="0x10053"/>
<rs:requested-attribute id="0x10245"/>
<rs:requested-attribute id="0x100c3"/>
<rs:requested-attribute id="0x230c51"/>
<rs:requested-attribute id="0x5918e45"/>
</rs:model-request>
For further information, review this KB article: https://knowledge.broadcom.com/external/article/15027/how-to-get-spectrum-model-attributes-via.html
3) In the Auth TAB, supply the username and password
And click on the button to run the query.
4) See the query result in the Body TAB, at the bottom.