Hi all,
I really struggle to get a proper alert on a Windows C: drive size.
Checker is as follows (can also be found in attachment):
Storage_perc greater 50
Hostname match ampere*
Entity *
Only if I fill it in as above at least the checker is added.
As soon as I change entity to storage_type equals hrStorageFixedDisk like written in manuals it doesn't even add the check after the rebuild option.
I have run ./poller.php -h ampere.companyname.pvt -dd with attached result.
As you can see the C:\ drive is filled more than 50% so I would expect an alert.
Who can help me with this?
Thanks in advance.
Kind regards,
Epco Dijk Epco Dijk Systems Administrator
Northpool bv Kanaalpark 140 2321JV Leiden The Netherlands Tel: +31 (0)88 2400300 Fax: +31 (0)88 2400399 E-mail: epco.dijk@northpool.nl Web: www.northpool.nl
[http://www.northpool.nl/wp-content/uploads/2015/09/signature.png]
This message and any attachments (the "message") are confidential and intended solely for the addressees. If you are not the addressee indicated in this message or if this message has been addressed to you by error, you may not copy or deliver this message to anyone but destroy it and kindly notify the sender by reply email. Any unauthorised use or dissemination is prohibited. E-mails are susceptible to alteration. Northpool bv shall not be liable for the message if altered, changed or falsified.
Is windows actually returning hrStorageFixedDisk as the type?
Using that as an entity match certainly works for me on *nix drives.
http://omega.memetic.org/~adama/monosnap/Observium_Dev____-_Alert_check_-_Go...
adam. On 12/05/2016 18:04:29, Epco Dijk epco.dijk@northpool.nl wrote: Hi all,
I really struggle to get a proper alert on a Windows C: drive size.
Checker is as follows (can also be found in attachment):
Storage_perc greater 50
Hostname match ampere*
Entity *
Only if I fill it in as above at least the checker is added.
As soon as I change entity to storage_type equals hrStorageFixedDisk like written in manuals it doesn't even add the check after the rebuild option.
I have run ./poller.php -h ampere.companyname.pvt -dd with attached result.
As you can see the C:\ drive is filled more than 50% so I would expect an alert.
Who can help me with this?
Thanks in advance.
Kind regards,
Epco Dijk Epco Dijk Systems Administrator
Northpool bv Kanaalpark 140 2321JV Leiden The Netherlands Tel: +31 (0)88 2400300 Fax: +31 (0)88 2400399 E-mail: epco.dijk@northpool.nl Web: www.northpool.nl
[http://www.northpool.nl/wp-content/uploads/2015/09/signature.png]
This message and any attachments (the "message") are confidential and intended solely for the addressees. If you are not the addressee indicated in this message or if this message has been addressed to you by error, you may not copy or deliver this message to anyone but destroy it and kindly notify the sender by reply email. Any unauthorised use or dissemination is prohibited. E-mails are susceptible to alteration. Northpool bv shall not be liable for the message if altered, changed or falsified. _______________________________________________ observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
CE scrub here; Yes it does - and this checker is a partial success to me:
[image: Inline image 1]
The only thing I still haven't figured out is how to match particular drive-letters. When its listed as "C:\ Label: Serial Number 58edd0c8" - Im fumbling trying to find a way to match the beginning of the string and look for "C:"
I presume there is some magic involved with the "match" keyword and how to use it with a regex?
You can use regular expressions.
storage_descr regex /^c/ or something? :D
adam. On 12/05/2016 18:41:57, Pål Rydningen paal.rydningen@gmail.com wrote: CE scrub here; Yes it does - and this checker is a partial success to me:
[Inline image 1]
The only thing I still haven't figured out is how to match particular drive-letters. When its listed as "C:\ Label: Serial Number 58edd0c8" - Im fumbling trying to find a way to match the beginning of the string and look for "C:"
I presume there is some magic involved with the "match" keyword and how to use it with a regex?
_______________________________________________ observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
That changes everything Adam! I was not aware that "regex" could be a test-keyword... You got access to the source-code or something? ;)
Seriously tho - this did spur me into looking twice at things and a plain "storage_descr match C*" did the trick.
On Thu, May 12, 2016 at 7:50 PM, Adam Armstrong adama@memetic.org wrote:
You can use regular expressions.
storage_descr regex /^c/ or something? :D
adam.
On 12/05/2016 18:41:57, Pål Rydningen paal.rydningen@gmail.com wrote: CE scrub here; Yes it does - and this checker is a partial success to me:
[image: Inline image 1]
The only thing I still haven't figured out is how to match particular drive-letters. When its listed as "C:\ Label: Serial Number 58edd0c8" - Im fumbling trying to find a way to match the beginning of the string and look for "C:"
I presume there is some magic involved with the "match" keyword and how to use it with a regex?
_______________________________________________ observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
Well, I did write it :D
Match does a str_match() style comparison. Easier, faster and sufficient in most instances.
Adam.
Sent from BlueMail
On 12 May 2016, 19:07, at 19:07, "Pål Rydningen" paal.rydningen@gmail.com wrote:
That changes everything Adam! I was not aware that "regex" could be a test-keyword... You got access to the source-code or something? ;)
Seriously tho - this did spur me into looking twice at things and a plain "storage_descr match C*" did the trick.
On Thu, May 12, 2016 at 7:50 PM, Adam Armstrong adama@memetic.org wrote:
You can use regular expressions.
storage_descr regex /^c/ or something? :D
adam.
On 12/05/2016 18:41:57, Pål Rydningen paal.rydningen@gmail.com
wrote:
CE scrub here; Yes it does - and this checker is a partial success to
me:
[image: Inline image 1]
The only thing I still haven't figured out is how to match particular drive-letters. When its listed as "C:\ Label: Serial Number 58edd0c8" - Im fumbling trying to find a way to match the beginning of the string and look
for "C:"
I presume there is some magic involved with the "match" keyword and
how to
use it with a regex?
_______________________________________________ observium mailing
list
observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
-- Pål R.
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
participants (3)
-
Adam Armstrong
-
Epco Dijk
-
Pål Rydningen