0

I have munin running rather fine on a CentOs webserver machine, except for one graph from the "Tomcat Threads" plugin that is incomplete. Why is it doing this? My server is far from overloaded.

See the incomplete graph :

Munin graph incomplete

All other Tomcat graphs are ok, like this one : Munin graph ok

When I run the following command :

 munin-run tomcat_threads

It will fail most of the time, giving me the same answer :

busy.value U
idle.value U

Sometimes it will work, giving me correct values :

busy.value 1
idle.value 9

Debug mode and log don't show any useful information.

I am running

  • CentOS 7.7.1908
  • Apache 2.4.6
  • Tomcat 9.0.16
  • Munin-Node 2.0.51

1 Answer 1

2

I'm no expert but maybe there's a typo in tomcat_threads plugin code. I replaced '&&' with '||' in the following sentence and everything worked like a charm:

if($xml->{'connector'}->{$CONNECTOR}->{'threadInfo'}->[0]->{'currentThreadsBusy'} &&
    $xml->{'connector'}->{$CONNECTOR}->{'threadInfo'}->[0]->{'currentThreadCount'}) {
    print "busy.value " . $xml->{'connector'}->{$CONNECTOR}->{'threadInfo'}->[0]->{'currentThreadsBusy'} . "\n";
    print "idle.value " .
          ($xml->{'connector'}->{$CONNECTOR}->{'threadInfo'}->[0]->{'currentThreadCount'} -
          $xml->{'connector'}->{$CONNECTOR}->{'threadInfo'}->[0]->{'currentThreadsBusy'}) . "\n";
} else {
    print "busy.value U\n";
    print "idle.value U\n";
} 
1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .