Re: Excluding one filesystem from a threshold but not all

Mike Diehn <[email protected]> Tue, 18 Dec 2018 11:33:08 -0500
Newsgroups gmane.network.opennms.general
Message-ID <CANC37G9quGz4mfH+S9T3SgG_0aHUOPny_yb-PpwniB+3qrRtpg@mail.gmail.com>
--===============3627455027039589680==
Content-Type: multipart/alternative; boundary="00000000000087b1a2057d4e7457"

--00000000000087b1a2057d4e7457
Content-Type: text/plain; charset="UTF-8"

Thank you both, Marcel and Dino.

I *like* the idea of filtering the packages using catinc. I do that in
other places. I like use regexps and maybe this will work.

I've written and erased about 1000 words asking and answering questions and
thinking through ideas. I think I've convinced myself I can use what you
guys suggested to come up with a workable solution. Not elegant, not
perfect, but functional.

I wonder what other folks have actually done to solve this problem. Surely
I'm not the first.





On Tue, Dec 18, 2018 at 9:43 AM Dino Yancey <[email protected]>
wrote:

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



-- 
Mike Diehn
Enfield, NH
[email protected]

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

<div dir=3D"ltr"><br><div>Thank you both, Marcel and Dino.</div><div><br></=
div><div>I <i>like</i> the idea of filtering the packages using catinc. I d=
o that in other places. I like use regexps and maybe this will work.</div><=
div><br></div><div>I&#39;ve written and erased about 1000 words asking and =
answering questions and thinking through ideas. I think I&#39;ve convinced =
myself I can use what you guys suggested to come up with a workable solutio=
n. Not elegant, not perfect, but functional.</div><div><br></div><div>I won=
der what other folks have actually done to solve this problem. Surely I&#39=
;m not the first.</div><div><br></div><div><br></div><div><br></div><div><b=
r></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Tue, Dec 1=
8, 2018 at 9:43 AM Dino Yancey &lt;<a href=3D"mailto:dino2gnt%2Bopennms@gma=
il.com">[email protected]</a>&gt; wrote:<br></div><blockquote clas=
s=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid r=
gb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div dir=3D"ltr"><div>Re=
source filter &amp; a regex.</div><div><br></div><div><span style=3D"font-f=
amily: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 o=
f type hrStorageFixedDisk, such as a locally attached or USB-attached hard =
disk)&quot; type=3D&quot;high&quot; ds-type=3D&quot;hrStorageIndex&quot; va=
lue=3D&quot;91.0&quot; rearm=3D&quot;89.0&quot; trigger=3D&quot;2&quot; ds-=
label=3D&quot;hrStorageDescr&quot; triggeredUEI=3D&quot;<a href=3D"http://u=
ei.opennms.org/threshold/highThresholdExceeded" target=3D"_blank">uei.openn=
ms.org/threshold/highThresholdExceeded</a>&quot; rearmedUEI=3D&quot;<a href=
=3D"http://uei.opennms.org/threshold/highThresholdRearmed" target=3D"_blank=
">uei.opennms.org/threshold/highThresholdRearmed</a>&quot; filterOperator=
=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]" target=3D"_blank">[email protected]=
m</a>&gt; wrote:<br></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><b=
r></div>I&#39;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.=
<div><br></div><div>We have some very large filesystems on a few of our nod=
es that we want to exclude from the 80% check. We don&#39;t want to exclude=
 all the filesystems on those nodes. So, from my perspective it seems I wan=
t to filter those very large filesystems out of the threshold. But I can&#3=
9;t find a way to do that.</div><div><br></div><div>Assuming that we really=
 do need to do what I&#39;ve described but are happy to do anything at all =
in OpenNMS to achieve 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>-- <b=
r><div dir=3D"ltr" class=3D"gmail-m_6731016748911469973gmail-m_169640304513=
2283172gmail_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>
_______________________________________________<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><br clear=3D"all"><div><br></div=
>-- <br><div dir=3D"ltr" class=3D"gmail_signature"><div dir=3D"ltr">Mike Di=
ehn<br>Enfield, NH<br><div><a href=3D"mailto:[email protected]" target=3D"_bla=
nk">[email protected]</a></div></div></div>

--00000000000087b1a2057d4e7457--


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


--===============3627455027039589680==
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
--===============3627455027039589680==--