Re: Excluding one filesystem from a threshold but not all

Dino Yancey <[email protected]> Tue, 18 Dec 2018 08:41:30 -0600
Newsgroups gmane.network.opennms.general
Message-ID <CA+GnOzTMPvht_+ZWeRqOdhNAuHUmbZjRK-+o9DrLG+NhjZ0QAA@mail.gmail.com>
--===============1755617128649334858==
Content-Type: multipart/alternative; boundary="000000000000555517057d4ce59b"

--000000000000555517057d4ce59b
Content-Type: text/plain; charset="UTF-8"

Resource filter & a regex.

      <expression description="Trigger an alert when the percentage of disk
space used reaches or goes above 90% for two consecutive measurement
intervals (only for disks of type hrStorageFixedDisk, such as a locally
attached or USB-attached hard disk)" type="high" ds-type="hrStorageIndex"
value="91.0" rearm="89.0" trigger="2" ds-label="hrStorageDescr"
triggeredUEI="uei.opennms.org/threshold/highThresholdExceeded" rearmedUEI="
uei.opennms.org/threshold/highThresholdRearmed" filterOperator="AND"
expression="hrStorageUsed / hrStorageSize * 100.0">
         <resource-filter
field="hrStorageType">^\.1\.3\.6\.1\.2\.1\.25\.2\.1\.4$</resource-filter>
         <resource-filter
field="hrStorageDescr">^(?:(?!(/proc|/sys|/dev/shm)).)+$</resource-filter>
      </expression>

For example, the above will only fire where hrStorageDesc is _not_ /proc,
/sys, /dev, or /dev/shm.  Edit as necessary.

Dino

On Tue, Dec 18, 2018 at 8:33 AM Mike Diehn (GMail) <[email protected]>
wrote:

>
> Good morning, neighbors!
>
> I've configured three thresholds to alert when filesystems fill past 80,
> 90, and 95 percent so we have a sort of a graduated alarm system.
>
> We have some very large filesystems on a few of our nodes that we want to
> exclude from the 80% check. We don't want to exclude all the filesystems on
> those nodes. So, from my perspective it seems I want to filter those very
> large filesystems out of the threshold. But I can't find a way to do that.
>
> Assuming that we really do need to do what I've described but are happy to
> do anything at all in OpenNMS to achieve it, do any of you have any
> suggestions?
>
> Thank you,
> Mike
>
> --
> Mike Diehn
> Enfield, NH
> [email protected]
> _______________________________________________
> 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

--000000000000555517057d4ce59b
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div>Resource filter &amp; a regex.</div>=
<div><br></div><div><span style=3D"font-family:monospace,monospace">=C2=A0 =
=C2=A0 =C2=A0 &lt;expression description=3D&quot;Trigger an alert when the =
percentage of disk space used reaches or goes above 90% for two consecutive=
 measurement intervals (only for disks of type hrStorageFixedDisk, such as =
a locally attached or USB-attached hard disk)&quot; type=3D&quot;high&quot;=
 ds-type=3D&quot;hrStorageIndex&quot; value=3D&quot;91.0&quot; rearm=3D&quo=
t;89.0&quot; trigger=3D&quot;2&quot; ds-label=3D&quot;hrStorageDescr&quot; =
triggeredUEI=3D&quot;<a href=3D"http://uei.opennms.org/threshold/highThresh=
oldExceeded">uei.opennms.org/threshold/highThresholdExceeded</a>&quot; rear=
medUEI=3D&quot;<a href=3D"http://uei.opennms.org/threshold/highThresholdRea=
rmed">uei.opennms.org/threshold/highThresholdRearmed</a>&quot; filterOperat=
or=3D&quot;AND&quot; expression=3D&quot;hrStorageUsed / hrStorageSize * 100=
.0&quot;&gt;<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&lt;resource-filter field=
=3D&quot;hrStorageType&quot;&gt;^\.1\.3\.6\.1\.2\.1\.25\.2\.1\.4$&lt;/resou=
rce-filter&gt;<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&lt;resource-filter fie=
ld=3D&quot;hrStorageDescr&quot;&gt;^(?:(?!(/proc|/sys|/dev/shm)).)+$&lt;/re=
source-filter&gt;<br>=C2=A0 =C2=A0 =C2=A0 &lt;/expression&gt;</span></div><=
div><span style=3D"font-family:monospace,monospace"><br></span></div><div><=
span style=3D"font-family:monospace,monospace">For example, the above will =
only fire where hrStorageDesc is _not_ /proc, /sys, /dev, or /dev/shm.=C2=
=A0 Edit as necessary.<br></span></div><div><span style=3D"font-family:mono=
space,monospace"><br></span></div><div><span style=3D"font-family:monospace=
,monospace">Dino</span><br></div></div></div><br><div class=3D"gmail_quote"=
><div dir=3D"ltr">On Tue, Dec 18, 2018 at 8:33 AM Mike Diehn (GMail) &lt;<a=
 href=3D"mailto:[email protected]">[email protected]</a>&gt; wrote:<b=
r></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex=
;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr">=
<div><br></div><div>Good morning, neighbors!</div><div><br></div>I&#39;ve c=
onfigured three thresholds to alert when filesystems fill past 80, 90, and =
95 percent so we have a sort of a graduated alarm system.<div><br></div><di=
v>We have some very large filesystems on a few of our nodes that we want to=
 exclude from the 80% check. We don&#39;t want to exclude all the filesyste=
ms on those nodes. So, from my perspective it seems I want to filter those =
very large filesystems out of the threshold. But I can&#39;t find a way to =
do that.</div><div><br></div><div>Assuming that we really do need to do wha=
t I&#39;ve described but are happy to do anything at all in OpenNMS to achi=
eve it, do any of you have any suggestions?</div><div><br></div><div>Thank =
you,</div><div>Mike<br clear=3D"all"><div><br></div>-- <br><div dir=3D"ltr"=
 class=3D"gmail-m_1696403045132283172gmail_signature"><div dir=3D"ltr">Mike=
 Diehn<br>Enfield, NH<br><div><a href=3D"mailto:[email protected]" target=3D"_=
blank">[email protected]</a></div></div></div></div></div>
_______________________________________________<br>
Please read the OpenNMS Mailing List FAQ:<br>
<a href=3D"http://www.opennms.org/index.php/Mailing_List_FAQ" rel=3D"norefe=
rrer" target=3D"_blank">http://www.opennms.org/index.php/Mailing_List_FAQ</=
a><br>
<br>
opennms-discuss mailing list<br>
<br>
To *unsubscribe* or change your subscription options, see the bottom of thi=
s page:<br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/opennms-discuss" re=
l=3D"noreferrer" target=3D"_blank">https://lists.sourceforge.net/lists/list=
info/opennms-discuss</a></blockquote></div>

--000000000000555517057d4ce59b--


--===============1755617128649334858==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============1755617128649334858==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
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
--===============1755617128649334858==--