Iam using Nagios Core on a Raspberry Pi with Raspbian and i want to monitor the temperature and humidity of a room.
So i installed wiring pi and dht22 for the dht22 sensor. Also i created a script for it, a command and the host with the services.
So far everything works fine and i got no problems.
When i run the script in the command line, it works, i got the values for the temperature and humidity.
But in the web interface i have the message: no output returned from plugin.
What have I do, that i can see the values also in the web interface.
Here are my scripts:
temperature
Code: Select all
#!/bin/sh
case $1 in
config)
cat <<'EOM'
graph_title Temperatur
graph_vlabel temperature
temperature.label °C
EOM
exit 0;;
esac
echo $(~/wiringpi/lol_dht22/loldht 7 | grep -i "temperature" | cut -d ' ' -f7)
echo "°"
Code: Select all
#!/bin/bash
case $1 in
config)
cat <<'EOM'
graph_title relative Luftfeuchtigkeit
graph_vlabel humidity
humidity.label r. F. %
EOM
exit 0;;
esac
echo $(~/wiringpi/lol_dht22/loldht 7 | grep -i "humidity" | cut -d ' ' -f3)
echo "%"