Re: Restart Detection

Jonathan Heard <[email protected]>
Newsgroups gmane.network.opennms.general
Message-ID <[email protected]>
Hi Dave,

    I've not implemented this specific check, but I have done other 
thresholds... So firstly, about categories: This is a really annoyingly 
loose term in OpenNMS (In My Opinion) as there are several data elements 
called 'category' which bear no relation to each other - in the filters 
for a threshold it's referring to the categories you can see in the 
'Surveillance Category Memberships' table when viewing a node.

My understanding of the filter is that doing a

categoryname==  'TH-SYSTEM-UPTIME-L-10'

will only match if the node has only that Surveillance Category. All my 
node categorisation is done using the 'catInc' filter which means 'node 
has this category' - e.g.

<filter>catIncTH-SYSTEM-UPTIME-L-10</filter>

 From the node view in the web interface you can edit the node's 
surveillance categories. It's important to note that 'catInc' does not 
work for categories with spaces in their name (I believe hyphens and 
underscores should work, but I've avoided them in my setup and used 
purely alphabetic names in CamelCase"

The page you've linked doesn't give direct information about where all 
this XML should live. I'd expect to see the <event> stuff added to its 
own xml file e.g. /etc/opennms/events/restart_detection.xml and then 
referenced in the /etc/opennms/eventconf.xml file (this is processed in 
order, with catch-all events included at the bottom, so you need to 
include yours above those).
The <package> definition should go in 
/etc/opennms/threshd-configuration.xml and the <group> into 
/etc/opennms/thresholds.xml

You should also check your config files are properly formatted. Using 
'xmllint' is a good 1st pass and then you can run 
<OPENMS_HOME>/bin/config-tester -a

After all this configuration you really need to restart OpenNMS to 
ensure that it's actually loaded and active.

If it still doesn't work with a catInc filter and checking that a node 
had the right category, then you can take a look at the logs to see what 
it happening. Confusingly, thresholding is NOT logged to the ThreshD log 
because the functionality was ported into CollectD, so if you edit 
/etc/opennms/log4j2.xml and bump collectd up to DEBUG level logging, 
then you should be able to find details in /var/log/opennms/collectd.log 
for your node's IP address every time the collection runs, and the 
subsequent triggering of the thresholding checks. This may shed some 
light on the problem.

Hope this helps
Jonathan

On 24/10/17 15:29, Dave Lewis wrote:
>
> Hi all,
>
> IÂ’m looking for some help.
>
> I was reading this wiki - https://wiki.opennms.org/wiki/Restart_Detection
>
> And I implemented it the way it made reference to.  But for some 
> reason I am not getting notified when a device reboots.   If I look at 
> the collection graphs it is collecting statistics on the uptime on the 
> box so at least the collection is working properly, and if I run a 
> test on the alert from the server prompt it sends the email as 
> expected, but the automatic tripping doesnÂ’t seem to happen.
>
> Has anyone gone down this road and had a similar experience ? ItÂ’s 
> like every part seems to be working but not everything together.  I 
> figure I’ve missed something but I’m drawing a blank as to what.   The 
> only part that I could think that maybe I didnÂ’t do right is assign 
> the node to the category ? where would that be done ? The only place I 
> see is under the asset window of the node and I put in 
> “TH-SYSTEM-UPTIME-L-10”.
>
> Any help would be greatly appreciated.
>
> Tks,
>
> Dave
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>
>
> _______________________________________________
> Please read the OpenNMS Mailing List FAQ:
> http://www.opennms.org/index.php/Mailing_List_FAQ
>
> opennms-discuss mailing list
>
> To *unsubscribe* or change your subscription options, see the bottom of this page:
> https://lists.sourceforge.net/lists/listinfo/opennms-discuss

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-discuss mailing list

To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-discuss
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.