On Thu, 20 Apr 2006, Kristian Eide wrote:
- Is the alertq table suppose to just increase and increase?
manage=> select count(*) from alertq; #$this->{dbh}->do("delete from alertq where alertqid=$this->{id}");
I think this was commented out mainly for debugging. It is probably safe to enable the above delete command.
Seems like it, yes! -bash-3.00# cat /usr/local/nav/var/log/alertengine.log | grep 'deleted alertqid' | wc -l 17068
Is it safe/should I empty the alertq table?
- Some alerts are missing sysname in the alerts. It shows netbox.deviceid
You can change the text in alertmsg.conf.
Ah, of course. Sorry, should've seen this myself! #:)
- Why are alerts like the example in '3.' coming? We get them from ALOT
of devices every 6. hour.. These are more or less only Cisco Catalyst devices, if thats of importance.
I believe this is due to a string compare being case sensitive when it should be not, and that has been fixed in the svn tree (and will thus be part of the next version of nav if you do not want to compile yourself).
Do you know which file(s)? So I can fix it without compiling and change to svn..
-Asbj?rn-
From peder.sefland at hivolda.no Thu Apr 20 12:41:19 2006
From: peder.sefland at hivolda.no (Peder Magne Sefland) Date: Thu Apr 20 11:41:39 2006 Subject: SV: Ang: [Nav-users] Bug-report In-Reply-To: Pine.SOL.4.63-L.0604200956050.24757@saruman.uio.no References: Pine.SOL.4.63-L.0604200956050.24757@saruman.uio.no Message-ID: 4447735F.3657.00CE.0@hivolda.no
Hi,
I have the same problem. The DNS-mismatch problem was I able to sort out with making an alert filter group that Subtract alert type with dnsMismatch. I made this filter-group public so my colleagues can use the same filter-group. (se attached jpeg)
We got a Cisco 3560GPoE and this generate an hw-change alert. First I tried to change the alertmsg.conf, but that gave me just some other empty alerts. Then I tried to make an public filter on this device. The problem is that the alert just shows the deviceid and not the system-name or ip-address. So I ended up with an filter-group that Subtract Type C3560GPoE. But this not working yet. The dnsMismatch filter worked fine but not the Subtract-Type-filter.
Peder
Asbj?rn Pr?is a.l.prois@usit.uio.no 20.04.2006 10:27 >>>
Helo. I've got a couple of question regarding alerts in NAV (3.0.0).
1. Is the alertq table suppose to just increase and increase? manage=> select count(*) from alertq; count ------- 22726 (1 row)
I could be wrong (I probably am), but if its not suppose to increase, my guess is this is why : => /usr/local/nav/lib/perl/NAV/AlertEngine/Alert.pm, line 233 sub delete() #deletes alert from db { my $this=shift; if(!$this->{queued}) { $this->{log}->printlog("Alert","delete",$Log::debugging, "deleted alertqid=$this->{id}"); #$this->{dbh}->do("delete from alertq where alertqid=$this->{id}"); } }
----------------------------------------------
2. Some alerts are missing sysname in the alerts. It shows netbox.deviceid instead of netbox.sysname. This is very confusing for IT-guys at our facultys thats using NAV for receiving alerts regarding equipment at their location.
I.e : manage=> select * from alerthistmsg where alerthistid = '16292'; alerthistid | state | msgtype | language | msg -------------+-------+---------+----------+---------------------------------------------- 16292 | x | sms | no | HW Ver endret: 1009 V01 A0 16292 | x | sms | en | HW Ver changed: 1009 V01 A0 16292 | x | email | en | Subject: Hardware version changed for (1009) This is an automatically generated message from NAV:
Hardware version changed to: A0 from: V01 16292 | x | email | no | Subject: Hardware versjon endret for (1009) Dette er en automatisk generert melding fra NAV:
Hardware versjon endret til: A0 fra: V01 (4 rows)
-----------------------------------------------------------------
3. DNS mismatch alerts are "wrong". I.e : manage=> select * from alerthistmsg where alerthistid = 204; 204 | x | email | en | Subject: DNS Mismatch (xxyyzz.uio.no) This is an automatically generated message from NAV:
xxyyzz.uio.no does not match xxyyzz.uio.no 204 | x | email | no | Subject: DNS ikke i samsvar (xxyyzz.uio.no) Dette er en automatisk generert melding fra NAV:
xxyyzz.uio.no matcher ikke xxyyzz.uio.no (2 rows)
It should say "'hostname from switch' does not match DNSname" i guess..
------------------------------------------------------------------
4. Why are alerts like the example in '3.' coming? We get them from ALOT of devices every 6. hour.. These are more or less only Cisco Catalyst devices, if thats of importance.
By the way. I've made a perl-deamon that controlls that all of NAVs internal and external onces are running, and reports by mail and/or sms if something is wrong. Version two will try to restart dead processes as well. If anybody wants it, just drop me an email.
-Asbj?rn-