#1574 new defect

Returned no data for label

Reported by: pacolotero Owned by: nobody
Priority: normal Milestone:
Component: plugins Version: 2.0.19
Severity: normal Keywords:
Cc:

Description

I have written a plugin but the graph is empty.
In the log file show this error:

2014/07/17 08:50:02 [WARNING] Service emoworld_prueba on joker/127.0.0.1:4949 returned no data for label spots
2014/07/17 08:50:02 [WARNING] Service emoworld_prueba on joker/127.0.0.1:4949 returned no data for label routes
2014/07/17 08:50:02 [WARNING] Service emoworld_prueba on joker/127.0.0.1:4949 returned no data for label images
2014/07/17 08:50:02 [WARNING] Service emoworld_prueba on joker/127.0.0.1:4949 returned no data for label messages
2014/07/17 08:50:02 [WARNING] Service emoworld_prueba on joker/127.0.0.1:4949 returned no data for label publications
2014/07/17 08:50:02 [WARNING] Service emoworld_prueba on joker/127.0.0.1:4949 returned no data for label users
2014/07/17 08:50:02 [WARNING] Service emoworld_prueba on joker/127.0.0.1:4949 returned no data for label comments
2014/07/17 08:50:02 [WARNING] 4 lines had errors while 0 lines were correct (100.00%) in data from 'fetch emoworld_commentstype' on joker/127.0.0.1:4949

But if I run this command munin-run emoworld_prueba the plugin seems fine and returned data

users.value 1156

comments.value 9882

messages.value 6047

publications.value 2283

images.value 9152

spots.value 2316

routes.value 0

This is the plugin

#!/bin/sh
# -*- sh -*-
# vim: ft=sh

: << =cut

=head1 NAME

threads - Plugin to monitor the number of threads on Linux

=head1 CONFIGURATION

No configuration

=head1 AUTHOR

Lars Strand

=head1 LICENSE

GNU GPL

=head1 MAGIC MARKERS

 #%# family=auto
 #%# capabilities=autoconf

=cut

if [ "$1" = "autoconf" ]; then
    echo yes
    exit 0
fi

if [ "$1" = "config" ]; then
    echo 'graph_title Emotionalworld Statistics'
    echo 'graph_args --base 1000 -l 0 '
    echo 'graph_vlabel emoworld'
    echo 'graph_category emotionalworld'
    echo 'graph_info This graph shows statistics of emotionalworld.'
    echo 'users.label users'
    echo 'users.info The current number of users.'
    echo 'comments.label comments'
    echo 'comments.info The current number of comments.'
    echo 'messages.label messages'
    echo 'messages.info The current number of messages.'
    echo 'publications.label publications'
    echo 'publications.info The current number of publications.'
    echo 'images.label images'
    echo 'images.info The current number of images.'
    echo 'spots.label spots'
    echo 'spots.info The current number of spots.'
    echo 'routes.label routes'
    echo 'routes.info The current number of routes.'
    exit 0
fi

sed -n 1p /tmp/all | grep -oE "[[:digit:]]{1,}" | xargs -0 echo "users.value"
sed -n 2p /tmp/all | grep -oE "[[:digit:]]{1,}" | xargs -0 echo "comments.value"
sed -n 3p /tmp/all | grep -oE "[[:digit:]]{1,}" | xargs -0 echo "messages.value"
sed -n 4p /tmp/all | grep -oE "[[:digit:]]{1,}" | xargs -0 echo "publications.value"
sed -n 5p /tmp/all | grep -oE "[[:digit:]]{1,}" | xargs -0 echo "images.value"
sed -n 6p /tmp/all | grep -oE "[[:digit:]]{1,}" | xargs -0 echo "spots.value"
sed -n 7p /tmp/all | grep -oE "[[:digit:]]{1,}" | xargs -0 echo "routes.value"

Change History (1)

comment:1 Changed at 2014-10-22T01:03:46+02:00 by jeffsilverman

Did this issue ever get resolved? I am experiencing the same thing. I assume that the problem is a bug in my plugin, but I haven't a clue what that might be.

Note: See TracTickets for help on using tickets.