Skip to content

Instantly share code, notes, and snippets.

@wataru420
Created April 27, 2012 10:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save wataru420/2508307 to your computer and use it in GitHub Desktop.
Save wataru420/2508307 to your computer and use it in GitHub Desktop.
Tomcat7とmunin
if($xml->{'connector'}->{'http-'.$PORT}->{'threadInfo'}->[0]->{'currentThreadsBusy'} &&
$xml->{'connector'}->{'http-'.$PORT}->{'threadInfo'}->[0]->{'currentThreadCount'}) {
print "busy.value " . $xml->{'connector'}->{'http-'.$PORT}->{'threadInfo'}->[0]->{'currentThreadsBusy'} . "\n";
print "idle.value " .
($xml->{'connector'}->{'http-'.$PORT}->{'threadInfo'}->[0]->{'currentThreadCount'} -
$xml->{'connector'}->{'http-'.$PORT}->{'threadInfo'}->[0]->{'currentThreadsBusy'}) . "\n";
} else {
print "busy.value U\n";
print "idle.value U\n";
}
<role rolename="manager"/>
<role rolename="admin"/>
<user username="tomcat-probe" password="hogehoge" roles="admin,manager"/>
if($xml->{'connector'}->{'"http-bio-'.$PORT.'"'}->{'threadInfo'}->[0]->{'currentThreadsBusy'} &&
$xml->{'connector'}->{'"http-bio-'.$PORT.'"'}->{'threadInfo'}->[0]->{'currentThreadCount'}) {
print "busy.value " . $xml->{'connector'}->{'"http-bio-'.$PORT.'"'}->{'threadInfo'}->[0]->{'currentThreadsBusy'} . "\n";
print "idle.value " .
($xml->{'connector'}->{'"http-bio-'.$PORT.'"'}->{'threadInfo'}->[0]->{'currentThreadCount'} -
$xml->{'connector'}->{'"http-bio-'.$PORT.'"'}->{'threadInfo'}->[0]->{'currentThreadsBusy'}) . "\n";
} else {
print "busy.value U\n";
print "idle.value U\n";
}
<role rolename="manager-gui"/>
<role rolename="manager-status"/>
<role rolename="manager-script"/>
<role rolename="admin-gui"/>
<role rolename="admin-script"/>
<user username="tomcat-probe" password="hogehoge" roles="admin-gui,admin-script,manager-gui,manager-status,manager-script"/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment