|
From: Roland S. <ro...@lo...> - 2011-02-16 03:43:19
|
Hi,
Can't get this working, it seems ok but wont match my bb-hosts entry
against my specs file.
Xymon 4.3.0.0beta2 on Solaris 10, devmon
jupiter # /usr/local/devmon/devmon --help
Devmon v0.3.1-beta1, a device monitor for BigBrother/Hobbit
jupiter # grep -v '^#' devmon.cfg |grep -v '^$'
MULTINODE=NO
BBHOSTS=/usr/local/xymon/server/etc/bb-hosts
BBTAG=DEVMON
SNMPCIDS=mycommunity
NODENAME=HOSTNAME
PIDFILE=/var/run/devmon/devmon.pid
LOGFILE=/var/log/devmon.log
DBHOST=localhost
DBNAME=devmon
DBUSER=devmon
DBPASS=devmon
BBTYPE=hobbit
DISPSERV=localhost
DISPPORT=1985
MSGSIZE=8096
MSGSLEEP=10
CYCLETIME=60
DEADTIME=180
CLEARTIME=180
NUMFORKS=10
MAXPOLLTIME=30
SNMPTIMEOUT=2
SNMPTRIES=5
jupiter # find templates/ -ls
416978 2 drwxr-xr-x 3 root root 3 Feb 16 13:10
templates/
414263 2 drwxr-xr-x 2 root root 3 Feb 15 15:35
templates/HP-DL360
414289 1 -rw-r--r-- 1 root root 117 Feb 16 13:18
templates/HP-DL360/specs
jupiter # cat templates/HP-DL360/specs
vendor : HP
model : DL360
snmpver : 2
sysdesc : Linux ipndfw 2.4.21-21cpsmp #1 SMP Thu Sep 11 17:01:25 IDT
2008 i686
jupiter # grep DEVMON /usr/local/xymon/server/etc/bb-hosts
192.168.34.254 server001 # DEVMON
jupiter # /usr/sfw/bin/snmpget -v2c -c mycommunity 192.168.34.254
1.3.6.1.2.1.1.1.0
SNMPv2-MIB::sysDescr.0 = STRING: Linux ipndfw 2.4.21-21cpsmp #1 SMP Thu
Sep 11 17:01:25 IDT 2008 i686
jupiter #
Hope that is all the config.
Now I try to run devmon.
jupiter # /usr/local/devmon/devmon --readbbhosts -vvvvvvvvvvvv --debug
[11-02-16@13:18:14] Option 'bblocation' defaulting to:
[11-02-16@13:18:14] DEBUG TEMPLATES: running read_templates()
[11-02-16@13:18:14] DEBUG TEMPLATES: running post_template_load()
[11-02-16@13:18:14] Saw 1 vendors, 0 models, 0 sysdescs & 0 templates
[11-02-16@13:18:14] SNMP querying all hosts in bb-hosts file, please wait...
[11-02-16@13:18:14] Checking if # DEVMON matches NET:.
[11-02-16@13:18:14] DEBUG CFG: running read_hosts
[11-02-16@13:18:14] Option 'bbdateformat' defaulting to: .
[11-02-16@13:18:14] Querying new hosts using cid 'mycommunity' and snmp v2
[11-02-16@13:18:14] DEBUG SNMP: 1
[11-02-16@13:18:14] DEBUG SNMP: 0 => 1.3.6.1.2.1.1.1.0
[11-02-16@13:18:14] DEBUG SNMP: Adding ID => 1 OID =>1.3.6.1.2.1.1.1.0
[11-02-16@13:18:14] DEBUG SNMP: Pooling 1 oids
[11-02-16@13:18:14] DEBUG SNMP: Dethawing data for server001
[11-02-16@13:18:14] server001 sysdesc = ::: Linux server001
2.4.21-21cpsmp #1 SMP Thu Sep 11 17:01:25 IDT 2008 i686 :::
[11-02-16@13:18:14] No matching templates for device: server001
[11-02-16@13:18:14] Querying new hosts using cid 'mycommunity' and snmp v1
[11-02-16@13:18:14] Received signal TERM, shutting down with return code 0
[11-02-16@13:18:14] Received signal TERM, shutting down with return code 0
[11-02-16@13:18:14] Received signal TERM, shutting down with return code 0
[11-02-16@13:18:14] Received signal TERM, shutting down with return code 0
[11-02-16@13:18:14] Received signal TERM, shutting down with return code 0
[11-02-16@13:18:14] Received signal TERM, shutting down with return code 0
[11-02-16@13:18:15] Received signal TERM, shutting down with return code 0
[11-02-16@13:18:15] Received signal TERM, shutting down with return code 0
[11-02-16@13:18:15] Received signal TERM, shutting down with return code 0
[11-02-16@13:18:15] Received signal TERM, shutting down with return code 0
I fiddled around a lot changing the specs file and bb-hosts but can't
get a working config.
The devmon.log is empty...
I'm not a perl programmer but I started to add print statements in the code.
I found that it doesn't work in modules/dm_config.pm
1550 # Try and match sysdesc
1551 NEWMATCH: for my $vendor (keys %{$g{'templates'}}) {
1552 print "TEST $vendor\n";
1553 NEWMODEL: for my $model (keys
%{$g{'templates'}{$vendor}}) {
1554 print "TEST2 $model\n";
And here is the code that actually does the match.... (I think)
print "TEST $vendor\n"; prints "TEST HP" which is the same
as in my specs file.
print "TEST2 $model\n"; doesn't print at all
Any help appreciated.
- Roland
|