Hello Guest

Author Topic: SNMP uptime formatting  (Read 7458 times)

0 Members and 1 Guest are viewing this topic.

Offline cbillson

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
    • View Profile
SNMP uptime formatting
« on: August 20, 2014, 04:51:46 AM »
Hi, i'm wondering if its possible to format the value returned by SNMP into a human time?

Cisco routers have the OID .1.3.6.1.2.1.1.3.0 which is found by the recon task, this is the time (in hundredths of seconds) since the router was last reloaded. This displays as a raw number for the module result. Can i format this or get this to display as a dd/mm/yyhh:ss format?

module_begin
module_name sysUpTime
module_description The time (in hundredths of a second) since the network management portion of the system was last re-initialized.
module_type remote_snmp_string
module_snmp
module_oid .1.3.6.1.2.1.1.3.0
module_community vodat-public
module_end

Thanks
Chris

Offline ivo_yordanov

  • Smart member
  • *****
  • Posts: 404
  • Karma: 2
    • View Profile
Re: SNMP uptime formatting
« Reply #1 on: August 20, 2014, 09:34:56 AM »
Hello

You can use the post process feature in the module's advanced settings to change the time setting.

Regards
Ivo

Offline cbillson

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
    • View Profile
Re: SNMP uptime formatting
« Reply #2 on: August 21, 2014, 02:55:44 AM »
Thanks for the info, do you have any examples, or documentation on how to do this? the only bit i can find is:

http://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring#Monitoring_with_Plug_Ins

Quote
Post Process

The module's post processing. It's useful to multiply or divide the returned value, e.g. when we obtain bytes and we want to show the value in Megabytes.

Offline ivo_yordanov

  • Smart member
  • *****
  • Posts: 404
  • Karma: 2
    • View Profile
Re: SNMP uptime formatting
« Reply #3 on: August 21, 2014, 03:43:27 AM »
Hello

You can find more information on this on the proper console. There is a question icon next to the parameter click on it and there you can find additional information.

Regards
Ivo

Offline cbillson

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
    • View Profile
Re: SNMP uptime formatting
« Reply #4 on: August 21, 2014, 03:46:27 AM »
Thanks, i have already checked here, and it does not contain much more information than the documentation i quoted above.

Quote
Post process
Post process is a numeric value used after get data to numerical post process in a multiplier operation. For example a data with a value of 1000 with a Post Process value of 1024 will result in a definitive data of 1024000 value. This is useful to normalize data, convert between units, etc. This also can be used to divide, using a multiplier below 1 value, like, for example, 0.001 that will divide current value by 1000.

An empty value, or 0, will disable the usage of post process (default).

is there any more detailed information available on how to perform this processing?

Offline Hung Tran

  • Jr. Member
  • **
  • Posts: 19
  • Karma: 0
    • View Profile
Re: SNMP uptime formatting
« Reply #5 on: September 29, 2014, 03:42:19 AM »
The default SNMP check just returns a number of seconds of uptime. So, you should write a simple plugin to check uptime by snmpget with Cisco MIB. You will get a readable result like: 24 hour 30 minutes 15 second.... in string type (generic string).

Hope this help,

Offline Carnivalesk

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
SNMP uptime formatting
« Reply #6 on: September 11, 2015, 04:21:28 AM »
Is the 99.9 uptime guarantee for every month or a year?