cat > /etc/nrpe.d/confluence.cfg << 'EOF'
command[check_confluence_memory_max]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9001/jmxrmi -O java.lang:type=Memory -A HeapMemoryUsage -K max -I HeapMemoryUsage -J max -w 800000000 -c 1500000000 -username tomcat -password tomcatjmxmonitor
command[check_confluence_memory_used]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9001/jmxrmi -O java.lang:type=Memory -A HeapMemoryUsage -K used -I HeapMemoryUsage -J used -w 800000000 -c 1500000000 -username tomcat -password tomcatjmxmonitor
command[check_confluence_bytes_send]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9001/jmxrmi -O Standalone:type=GlobalRequestProcessor,name=http-8090 -A bytesSent -w 800000000 -c 1500000000 -username tomcat -password tomcatjmxmonitor
command[check_confluence_bytes_received]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9001/jmxrmi -O Standalone:type=GlobalRequestProcessor,name=http-8090 -A bytesReceived -w 800000000 -c 1500000000 -username tomcat -password tomcatjmxmonitor
command[check_confluence_request_count]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9001/jmxrmi -O Standalone:type=GlobalRequestProcessor,name=http-8090 -A requestCount -w 800000000 -c 1500000000 -username tomcat -password tomcatjmxmonitor
command[check_confluence_error_count]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9001/jmxrmi -O Standalone:type=GlobalRequestProcessor,name=http-8090 -A errorCount -w 800000000 -c 1500000000 -username tomcat -password tomcatjmxmonitor
command[check_confluence_processing_time]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9001/jmxrmi -O Standalone:type=GlobalRequestProcessor,name=http-8090 -A processingTime -w 800000000 -c 1500000000 -username tomcat -password tomcatjmxmonitor
command[check_confluence_session_count]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9001/jmxrmi -O Standalone:type=Manager,path=/,host=localhost -A sessionCounter -w 800000000 -c 1500000000 -username tomcat -password tomcatjmxmonitor
command[check_confluence_session_active]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9001/jmxrmi -O Standalone:type=Manager,path=/,host=localhost -A activeSessions -vvvv -w 800000000 -c 1500000000 -username tomcat -password tomcatjmxmonitor
command[check_confluence_session_rejected]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9001/jmxrmi -O Standalone:type=Manager,path=/,host=localhost -A rejectedSessions -vvvv -w 800000000 -c 1500000000 -username tomcat -password tomcatjmxmonitor
command[check_confluence_thread_count]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9001/jmxrmi -O java.lang:type=Threading -A ThreadCount -J used -vvvv -w 800000000 -c 1500000000 -username tomcat tomcatjmxmonitor
command[check_confluence_thread_current]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9001/jmxrmi -O Standalone:type=ThreadPool,name=http-8090 -A currentThreadCount -w 800000000 -c 1500000000 -username tomcat -password tomcatjmxmonitor
command[check_confluence_thread_bussy]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9001/jmxrmi -O Standalone:type=ThreadPool,name=http-8090 -A currentThreadsBusy -w 800000000 -c 1500000000 -username tomcat -password tomcatjmxmonitor
EOF
cat > /etc/nrpe.d/jira.cfg << 'EOF'
command[check_jira_memory_max]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9002/jmxrmi -O java.lang:type=Memory -A HeapMemoryUsage -K max -I HeapMemoryUsage -J max -w 800000000 -c 1500000000 -username tomcat -password tomcatjmxmonitor
command[check_jira_memory_used]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9002/jmxrmi -O java.lang:type=Memory -A HeapMemoryUsage -K used -I HeapMemoryUsage -J used -w 800000000 -c 1500000000 -username tomcat -password tomcatjmxmonitor
command[check_jira_bytes_send]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9002/jmxrmi -O Catalina:type=GlobalRequestProcessor,name="http-bio-127.0.0.1-8080" -A bytesSent -w 800000000 -c 1500000000 -username tomcat -password tomcatjmxmonitor
command[check_jira_bytes_received]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9002/jmxrmi -O Catalina:type=GlobalRequestProcessor,name="http-bio-127.0.0.1-8080" -A bytesReceived -w 800000000 -c 1500000000 -username tomcat -password tomcatjmxmonitor
command[check_jira_request_count]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9002/jmxrmi -O Catalina:type=GlobalRequestProcessor,name="http-bio-127.0.0.1-8080" -A requestCount -w 800000000 -c 1500000000 -username tomcat -password tomcatjmxmonitor
command[check_jira_error_count]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9002/jmxrmi -O Catalina:type=GlobalRequestProcessor,name="http-bio-127.0.0.1-8080" -A errorCount -w 800000000 -c 1500000000 -username tomcat -password tomcatjmxmonitor
command[check_jira_processing_time]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9002/jmxrmi -O Catalina:type=GlobalRequestProcessor,name="http-bio-127.0.0.1-8080" -A processingTime -w 800000000 -c 1500000000 -username tomcat -password tomcatjmxmonitor
command[check_jira_session_count]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9002/jmxrmi -O Catalina:type=Manager,context=/,host=localhost -A sessionCounter -w 800000000 -c 1500000000 -username tomcat -password tomcatjmxmonitor
command[check_jira_session_active]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9002/jmxrmi -O Catalina:type=Manager,context=/,host=localhost -A activeSessions -vvvv -w 800000000 -c 1500000000 -username tomcat -password tomcatjmxmonitor
command[check_jira_session_rejected]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9002/jmxrmi -O Catalina:type=Manager,context=/,host=localhost -A rejectedSessions -vvvv -w 800000000 -c 1500000000 -username tomcat -password tomcatjmxmonitor
command[check_jira_thread_count]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9002/jmxrmi -O java.lang:type=Threading -A ThreadCount -J used -vvvv -w 800000000 -c 1500000000 -username tomcat -password tomcatjmxmonitor
command[check_jira_thread_current]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9002/jmxrmi -O Catalina:type=ThreadPool,name="http-bio-127.0.0.1-8080" -A currentThreadCount -w 800000000 -c 1500000000 -username tomcat -password tomcatjmxmonitor
command[check_jira_thread_bussy]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9002/jmxrmi -O Catalina:type=ThreadPool,name="http-bio-127.0.0.1-8080" -A currentThreadsBusy -w 800000000 -c 1500000000 -username tomcat -password tomcatjmxmonitor
EOF
cat > /etc/nrpe.d/crowd.cfg << 'EOF'
command[check_crowd_memory_max]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9003/jmxrmi -O java.lang:type=Memory -A HeapMemoryUsage -K max -I HeapMemoryUsage -J max -w 800000000 -c 1500000000 -username tomcat -password tomcatjmxmonitor
command[check_crowd_memory_used]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9003/jmxrmi -O java.lang:type=Memory -A HeapMemoryUsage -K used -I HeapMemoryUsage -J used -w 800000000 -c 1500000000 -username tomcat -password tomcatjmxmonitor
command[check_crowd_bytes_send]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9003/jmxrmi -O Catalina:type=GlobalRequestProcessor,name=http-127.0.0.1-8095 -A bytesSent -w 800000000 -c 1500000000 -username tomcat -password tomcatjmxmonitor
command[check_crowd_bytes_received]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9003/jmxrmi -O Catalina:type=GlobalRequestProcessor,name=http-127.0.0.1-8095 -A bytesReceived -w 800000000 -c 1500000000 -username tomcat -password tomcatjmxmonitor
command[check_crowd_request_count]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9003/jmxrmi -O Catalina:type=GlobalRequestProcessor,name=http-127.0.0.1-8095 -A requestCount -w 800000000 -c 1500000000 -username tomcat -password tomcatjmxmonitor
command[check_crowd_error_count]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9003/jmxrmi -O Catalina:type=GlobalRequestProcessor,name=http-127.0.0.1-8095 -A errorCount -w 800000000 -c 1500000000 -username tomcat -password tomcatjmxmonitor
command[check_crowd_processing_time]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9003/jmxrmi -O Catalina:type=GlobalRequestProcessor,name=http-127.0.0.1-8095 -A processingTime -w 800000000 -c 1500000000 -username tomcat -password tomcatjmxmonitor
command[check_crowd_session_count]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9003/jmxrmi -O Catalina:type=Manager,path=/crowd,host=localhost -A sessionCounter -w 800000000 -c 1500000000 -username tomcat -password tomcatjmxmonitor
command[check_crowd_session_active]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9003/jmxrmi -O Catalina:type=Manager,path=/crowd,host=localhost -A activeSessions -vvvv -w 800000000 -c 1500000000 -username tomcat -password tomcatjmxmonitor
command[check_crowd_session_rejected]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9003/jmxrmi -O Catalina:type=Manager,path=/crowd,host=localhost -A rejectedSessions -vvvv -w 800000000 -c 1500000000 -username tomcat -password tomcatjmxmonitor
command[check_crowd_thread_count]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9003/jmxrmi -O java.lang:type=Threading -A ThreadCount -J used -vvvv -w 800000000 -c 1500000000 -username tomcat -password tomcatjmxmonitor
command[check_crowd_thread_current]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9003/jmxrmi -O Catalina:type=ThreadPool,name=http-127.0.0.1-8095 -A currentThreadCount -w 800000000 -c 1500000000 -username tomcat -password tomcatjmxmonitor
command[check_crowd_thread_bussy]=/usr/local/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:9003/jmxrmi -O Catalina:type=ThreadPool,name=http-127.0.0.1-8095 -A currentThreadsBusy -w 800000000 -c 1500000000 -username tomcat -password tomcatjmxmonitor
EOF