Page 1 of 1

Information about device in web interface

PostPosted: Fri Jul 22, 2011 7:55 am
by Andrey123q
I need to display the device information in the web interface of nagios. For example:

Code: Select all
S6224-S2 Device, Compiled Feb 14 09:55:25 2011
SoftWare Version
BootRom Version 3.0.18
HardWare Version R01
Device serial number A738006198

All rights reserved

The first thing that comes to mind is to create a script that will make this information in a comment to the host.

Code: Select all
# $2 = community string
# $3 = OID

answer=`snmpwalk -v1 -c $2 $1 $3`
datetime=`date +%s`
#answer=`snmpwalk -v1 -c public`
#        snmpwalk -v1 -c public
cmdline="[$datetime] ADD_HOST_COMMENT;sw_fg_00;1;Security Audit;$answer"
`$echocmd $cmdline >> $CommandFile`

How to solve this problem best?

Re: Information about device in web interface

PostPosted: Tue Aug 02, 2011 4:50 pm
by agriffin
I think you're on the right track. This is how I'd do it if I had a need for something like this.