You can see in the script that value = U only printed, when the script can't check the lighttpd's access.log. But why can't script do it, when running via munin, and when running on local machine all is ok?

3 Answers
3

Do not check munin scripts with just direct scripts running. It's wrong way. There is special perl script munin-run that executes scripts exactly the same way as it runs during munin update and you'll able to find all errors.
May be you'll need define special settings for you script. You can do it in /etc/munin/plugin-conf.d/munin-node file next way:

well... now i get the correct output when fetching plugin via telnet but the graph don't run correcty and furthermore looks like the picture in my 1st post. "munin-run lighttpd_statuscodes"'s Output is ok. In "munin-update.log" i have a [WARNING]: "2011/12/20 11:20:02 [WARNING] Service ip_176_9_21_130 on server1.cluster1/123.123.123.123:4949 returned no data for label out". Any idea?
–
FTV AdminDec 20 '11 at 10:26

I don't know if you ever managed to fix this yourself, but I did and I thought I'd share my solution.

Rush was right in suggesting to run it as root, but the real error seems to be with your choice of name for your fields (1xx, 2xx, 3xx, ...). As per this wiki page:

Each data source in a plugin must be identified by a field name. The following describes the name of the field:
* The characters must be [a-zA-Z0-9_], while the first character must be [a-zA-Z_].

This is why you only ever saw 5xx in your graph and no results. While creating the rdd files munin replaced the numbers with an underscore (like _xx), which meant the data was overwritten for each of the 5 fields. The easy fix is to add a letter to your field names like so: