Jump to content

Briklets humidity and motion detector with nagios


Recommended Posts

hi all,

i need monitor server room with nagios and briklets.

I followed this wiki for temperature


and I followed base code


for check motion detector and


all work fine.

I need to integrate motion sensors and humidity in nagios.

Can anyone give me some guidance?

I can find a wiki for this?



Link to comment
Share on other sites

Ah, there was a bug in the script. It said "motion detected" if actually not motion was detected. It said "no motion detected" if actually motion was detected.


I've fixed this now.


There is a blue LED on the Motion Detector Bricklet that is on if motion is detected and is off if no motion is detected. You should now see that the script output matches the LED state.

Link to comment
Share on other sites

There are several print statements in the code like this one:


print "CRITICAL : %s too high %s %s" % (self.name, val, self.unit)


According to the link pnp4nagios expects


<whatever> | <label>=<value>;[<warn>];[<crit>];[<min>];[<max>]


to be printed. The script currently only prints the <whatever> part.


You can extend the print statements like this to add the part pnp4nagios is looking for:


print "CRITICAL : %s too high %s %s" % (self.name, val, self.unit) + " | " + self.name + "=" + str(val)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...