[collectd] Strange Time value in notification test
George B.
list1 at gir.me.uk
Wed Jun 18 19:50:44 CEST 2014
Hello,
I have configured a simple test notification using the Exec plugin. This works, however, the Time value in the notification message is changed into something strange (1.307) - can anyone suggest why this is happening?
----
root at croaker:~# cat /etc/collectd/collectd.conf
LoadPlugin exec
<Plugin exec>
NotificationExec "www-data" "/srv/www/notify.sh"
Exec "www-data" "/srv/www/test.sh"
</Plugin>
----
----
root at croaker:~# cat /srv/www/test.sh
#!/bin/bash
MESSAGE="Some random text"
SEVERITY="warning"
TIME=`date +%s`
LINE="PUTNOTIF message=\"$MESSAGE\" severity=$SEVERITY time=$TIME"
echo "$LINE" >> /tmp/out.txt
echo "$LINE"
----
----
root at croaker:~# cat /srv/www/notify.sh
#!/bin/bash
echo "$(cat)" >> /tmp/out.txt
----
----
root at croaker:~# tail -n 5 /tmp/out.txt
PUTNOTIF message="Some random text" severity=warning time=1403113649
Severity: WARNING
Time: 1.307
Some random text
----
I am running collectd 5.1.0 (Debian Wheezy).
Thanks,
George
More information about the collectd
mailing list