Information about device in web interface

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Information about device in web interface

Postby Andrey123q » Fri Jul 22, 2011 7:55 am

Hello.
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 6.1.94.82
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
#!/bin/sh
# $1 = $HOSTADDRESS$
# $2 = community string
# $3 = OID

answer=`snmpwalk -v1 -c $2 $1 $3`
echocmd="/bin/echo"
CommandFile="/var/log/nagios3/rw/nagios.cmd"
datetime=`date +%s`
#answer=`snmpwalk -v1 -c public 10.100.0.2 1.3.6.1.2.1.1.1.0`
#        snmpwalk -v1 -c public 10.100.0.2 1.3.6.1.2.1.1.1.0
cmdline="[$datetime] ADD_HOST_COMMENT;sw_fg_00;1;Security Audit;$answer"
`$echocmd $cmdline >> $CommandFile`


How to solve this problem best?
Andrey123q
 
Posts: 1
Joined: Fri Jul 22, 2011 7:18 am

Re: Information about device in web interface

Postby agriffin » Tue Aug 02, 2011 4:50 pm

I think you're on the right track. This is how I'd do it if I had a need for something like this.
agriffin
 
Posts: 876
Joined: Mon May 09, 2011 9:36 am


Return to Nagios Core

Who is online

Users browsing this forum: Alan, Google [Bot] and 19 guests