apache-cameljmxnagiosjboss6.xjbossfuse

does any pre setup need to be done on Camel to expose MBeans for Camel Routes for Monitoring purposes?


I am establishing alert notifications monitoring for my JBoss Fuse Karaf OSGI containers using Nagios Core 4.3.2. Jboss Fuse is 6.3 release comes with camel 2.17 bundled.

I need to report on the counts on camel routes. I've been able to get much on JBoss Fuse container monitored EXCEPT the camel routes. ???

It seems to not be aware of the MBeans for the camel routes?

do I need to do anything special to expose camel routes in Jboss Fuse container under JMX?

I've been able to get much monitored under Nagios for the container. list below. right now I'm only concerned with getting the services working. Later I'd like to migrate to using config files. thanks! Now ALL THESE WORK!!! I just can't seem to reach camel routes mbeans??? Just want to show that it is not the nagios setup, etc...

define command{
        command_name    check_local_container_heap_memory_usage
        command_line    $USER1$/check_jmx4perl --user $ARG1$ --password $ARG2$ --url $ARG3$ --mbean $ARG4$ --attribute $ARG5$ --path $ARG6$ --base $ARG7$ $ARG8$
        }

define command{
        command_name    check_remote_container_heap_available
        command_line    $USER1$/check_jmx4perl $ARG1$
        }

define command{
        command_name    check_local_container_broker_health
        command_line    $USER1$/check_jmx4perl --user $ARG1$ --password $ARG2$ --url $ARG3$ --mbean $ARG4$ --attribute $ARG5$ $ARG6$ $ARG7$
        }

define command{
        command_name    check_remote_container_broker_health
        command_line    $USER1$/check_jmx4perl $ARG1$ $ARG2$
        }
define command{
        command_name    check_local_container_thread_count
        command_line    $USER1$/check_jmx4perl --user $ARG1$ --password $ARG2$ --url $ARG3$ --mbean $ARG4$ --attribute $ARG5$ $ARG6
        }

define command{
        command_name    check_remote_container_thread_count
        command_line    $USER1$/check_jmx4perl $ARG1$ $ARG2$ $ARG3$
        }

define command{
        command_name    check_local_container_peak_thread_count
        command_line    $USER1$/check_jmx4perl --user $ARG1$ --password $ARG2$ --url $ARG3$ --mbean $ARG4$ --attribute $ARG5$ $ARG6
        }

define command{
        command_name    check_remote_container_peak_thread_count
        command_line    $USER1$/check_jmx4perl $ARG1$ $ARG2$ $ARG3$
        }

define command{
        command_name    check_local_container_non_heap_used
        command_line    $USER1$/check_jmx4perl --user $ARG1$ --password $ARG2$ --url $ARG3$ --mbean $ARG4$ --attribute $ARG5$ --path $ARG6$ --base $ARG7$ $ARG8$ $ARG9$
        }

define command{
        command_name    check_remote_container_non_heap_used
        command_line    $USER1$/check_jmx4perl $ARG1$ $ARG2$ $ARG3$
        }

#container uptime
define command{
        command_name    check_remote_container_uptime
        command_line    $USER1$/check_jmx4perl $ARG1$ $ARG2$ $ARG3$
        }

define command{
        command_name    check_local_container_uptime
        command_line    $USER1$/check_jmx4perl --user $ARG1$ --password $ARG2$ --url $ARG3$ --mbean $ARG4$ --attribute $ARG5$ $ARG6
        }
#Open File Descriptors
define command{
        command_name    check_remote_container_open_file_descriptors
        command_line    $USER1$/check_jmx4perl $ARG1$ $ARG2$ $ARG3$
        }

define command{
        command_name    check_local_container_open_file_descriptors
        command_line    $USER1$/check_jmx4perl --user $ARG1$ --password $ARG2$ --url $ARG3$ --mbean $ARG4$ --attribute $ARG5$ $ARG6
        }

define command{
        command_name    check_remote_container_context_state
        command_line    $USER1$/check_jmx4perl $ARG1$ $ARG2$ $ARG3$
        }

define command{
        command_name    check_local_container_context_state
        command_line    $USER1$/check_jmx4perl --user $ARG1$ --password $ARG2$ --url $ARG3$ --mbean $ARG4$ --attribute $ARG5$ --path $ARG6$ $ARG7$ $ARG8$
        }




define service{
       use                             generic-service
       host_name                       alphprdfuse1i
       service_description             Container PassThru Heap
       check_command                   check_nrpe!check_passthru_container_heap
       }
define service{
        use                             generic-service
        host_name                       alphprdfuse1i
        service_description             Container IPRCMT1 Heap
        check_command                   check_nrpe!check_iprcmt1_container_heap
        }

define service{
        use                             generic-service
        host_name                       alphprdfuse1i
        service_description             Container Delta MRO Heap
        check_command                   check_nrpe!check_deltamro_container_heap
        }

define service{
        use                             generic-service
        host_name                       alphprdfuse1i
        service_description             Container Delta FADEC Heap
        check_command                   check_nrpe!check_deltafadec_container_heap
        }

define service{
       use                              generic-service
       host_name                        alphprdfuse1i
       service_description              Container PassThru Heap Available
       check_command                    check_nrpe!check_remote_container_heap_avail!-a '--user passthru --password B@dC0mpany --url http://localhost:9090/jolokia --mbean java.lang:type=Memory --attribute HeapMemoryUsage --path used --base java.lang:type=Memory/HeapMemoryUsage/max --critical :95'
       }

define service{
       use                              generic-service
       host_name                        alphprdfuse1i
       service_description              Container IPRCMT1 Heap Available
       check_command                    check_nrpe!check_remote_container_heap_avail!-a '--user iprcmtx --password G00gl3M3 --url http://localhost:9091/jolokia --mbean java.lang:type=Memory --attribute HeapMemoryUsage --path used --base java.lang:type=Memory/HeapMemoryUsage/max --critical :95'
       }

define service{
       use                              generic-service
       host_name                        alphprdfuse1i
       service_description              Container Delta MRO Heap Available
       check_command                    check_nrpe!check_remote_container_heap_avail!-a '--user deltamro --password F@c3B00k --url http://localhost:9092/jolokia --mbean java.lang:type=Memory --attribute HeapMemoryUsage --path used --base java.lang:type=Memory/HeapMemoryUsage/max --critical :95'
       }

define service{
        use                             generic-service
        host_name                       alphprdfuse1i
        service_description             Container Delta FADEC Heap Available
        check_command                   check_nrpe!check_deltafadec_container_heap!-a '--user deltafadec --password B@dM0nk3y --url http://localhost:9093/jolokia --mbean java.lang:type=Memory --attribute HeapMemoryUsage --path used --base java.lang:type=Memory/HeapMemoryUsage/max --critical :95'
        }

define service{
        use                             generic-service
        host_name                       alphprdfuse1i
        service_description             Container Delta FADEC Broker Health
        check_command                   check_nrpe!check_remote_container_broker_health!-a "--user deltafadec --password B@dM0nk3y --url http://localhost:9093/jolokia --mbean org.apache.activemq:type=Broker,brokerName=amq,service=Health --attribute CurrentStatus --string --critical" "Good"
        }

define service{
        use                             generic-service
        host_name                       alphprdfuse1i
        service_description             Container Delta MRO Broker Health
        check_command                   check_nrpe!check_remote_container_broker_health!-a "--user deltamro --password F@c3B00k --url http://localhost:9092/jolokia --mbean org.apache.activemq:type=Broker,brokerName=amq,service=Health --attribute CurrentStatus --string --critical" "Good"
        }
define service{
        use                             generic-service
        host_name                       alphprdfuse1i
        service_description             Container IPRCMT1 Broker Health
        check_command                   check_nrpe!check_remote_container_broker_health!-a "--user iprcmtx --password G00gl3M3 --url http://localhost:9091/jolokia --mbean org.apache.activemq:type=Broker,brokerName=amq,service=Health --attribute CurrentStatus --string --critical" "Good"
        }
define service{
        use                             generic-service
        host_name                       alphprdfuse1i
        service_description             Container PassThru Broker Health
        check_command                   check_nrpe!check_remote_container_broker_health!-a "--user passthru --password B@dC0mpany --url http://localhost:9090/jolokia --mbean org.apache.activemq:type=Broker,brokerName=amq,service=Health --attribute CurrentStatus --string --critical" "Good"
        }

define service{
        use                             generic-service
        host_name                       alphprdfuse1i
        service_description             Container PassThru Non-Heap-Memory
        check_command                   check_nrpe!check_remote_container_non_heap_used!-a '--user passthru --password B@dC0mpany --url http://localhost:9090/jolokia --mbean java.lang:type=Memory --attribute NonHeapMemoryUsage --path used --base java.lang:type=Memory/NonHeapMemoryUsage/committed --critical :95'
        }
define service{
        use                             generic-service
        host_name                       alphprdfuse1i
        service_description             Container IPRCMT1 Non-Heap-Memory
        check_command                   check_nrpe!check_remote_container_non_heap_used!-a '--user iprcmtx --password G00gl3M3 --url http://localhost:9091/jolokia --mbean java.lang:type=Memory --attribute NonHeapMemoryUsage --path used --base java.lang:type=Memory/NonHeapMemoryUsage/committed --critical :95'
        }
define service{
        use                             generic-service
        host_name                       alphprdfuse1i
        service_description             Container Delta MRO Non-Heap-Memory
        check_command                   check_nrpe!check_remote_container_non_heap_used!-a '--user deltamro --password F@c3B00k --url http://localhost:9091/jolokia --mbean java.lang:type=Memory --attribute NonHeapMemoryUsage --path used --base java.lang:type=Memory/NonHeapMemoryUsage/committed --critical :95'
        }
define service{
        use                             generic-service
        host_name                       alphprdfuse1i
        service_description             Container Delta FADEC Non-Heap-Memory
        check_command                   check_nrpe!check_remote_container_non_heap_used!-a '--user deltafadec --password B@dM0nk3y --url http://localhost:9091/jolokia --mbean java.lang:type=Memory --attribute NonHeapMemoryUsage --path used --base java.lang:type=Memory/NonHeapMemoryUsage/committed --critical :95'
}

# Thread Count
define service{
        use                             generic-service
        host_name                       alphprdfuse1i
        service_description             Container PassThru Thread Count
        check_command                   check_nrpe!check_remote_container_thread_count!-a '--user passthru --password B@dC0mpany --url http://localhost:9090/jolokia --mbean java.lang:type=Threading --attribute ThreadCount --critical 90:200'
        }
define service{
        use                             generic-service
        host_name                       alphprdfuse1i
        service_description             Container IPRCMT1 Thread Count
        check_command                   check_nrpe!check_remote_container_thread_count!-a '--user iprcmtx --password G00gl3M3 --url http://localhost:9091/jolokia --mbean java.lang:type=Threading --attribute ThreadCount --critical 90:200'
        }
define service{
        use                             generic-service
        host_name                       alphprdfuse1i
        service_description             Container Delta MRO Thread Count
        check_command                   check_nrpe!check_remote_container_thread_count!-a '--user deltamro --password F@c3B00k --url http://localhost:9091/jolokia --mbean java.lang:type=Threading --attribute ThreadCount --critical 90:200'
        }
define service{
        use                             generic-service
        host_name                       alphprdfuse1i
        service_description             Container Delta FADEC Thread Count
        check_command                   check_nrpe!check_remote_container_thread_count!-a '--user deltafadec --password B@dM0nk3y --url http://localhost:9091/jolokia --mbean java.lang:type=Threading --attribute ThreadCount  --critical 90:200'
}
#Peak Thread Count
define service{
        use                             generic-service
        host_name                       alphprdfuse1i
        service_description             Container PassThru Peak Thread Count
        check_command                   check_nrpe!check_remote_container_peak_thread_count!-a '--user passthru --password B@dC0mpany --url http://localhost:9090/jolokia --mbean java.lang:type=Threading --attribute PeakThreadCount --critical :250'
        }
define service{
        use                             generic-service
        host_name                       alphprdfuse1i
        service_description             Container IPRCMT1 Peak Thread Count
        check_command                   check_nrpe!check_remote_container_peak_thread_count!-a '--user iprcmtx --password G00gl3M3 --url http://localhost:9091/jolokia --mbean java.lang:type=Threading --attribute PeakThreadCount --critical :250'
        }
define service{
        use                             generic-service
        host_name                       alphprdfuse1i
        service_description             Container Delta MRO Peak Thread Count
        check_command                   check_nrpe!check_remote_container_peak_thread_count!-a '--user deltamro --password F@c3B00k --url http://localhost:9092/jolokia --mbean java.lang:type=Threading --attribute PeakThreadCount --critical :250'
        }
define service{
        use                             generic-service
        host_name                       alphprdfuse1i
        service_description             Container Delta FADEC Peak Thread Count
        check_command                   check_nrpe!check_remote_container_peak_thread_count!-a '--user deltafadec --password B@dM0nk3y --url http://localhost:9093/jolokia --mbean java.lang:type=Threading --attribute PeakThreadCount --critical :250'
        }
#Container Uptime
#./check_jmx4perl --user passthru --password B@dC0mpany --url http://localhost:9090/jolokia --mbean java.lang:type=Runtime --attribute Uptime
define service{
        use                             generic-service
        host_name                       alphprdfuse1i
        service_description             Container PassThru Uptime
        check_command                   check_nrpe!check_remote_container_uptime!-a '--user passthru --password B@dC0mpany --url http://localhost:9090/jolokia --mbean java.lang:type=Runtime --attribute Uptime'
        }
define service{
        use                             generic-service
        host_name                       alphprdfuse1i
        service_description             Container IPRCMT1 Uptime
        check_command                   check_nrpe!check_remote_container_uptime!-a '--user iprcmtx --password G00gl3M3 --url http://localhost:9091/jolokia --mbean java.lang:type=Runtime --attribute Uptime'
        }
define service{
        use                             generic-service
        host_name                       alphprdfuse1i
        service_description             Container Delta MRO Uptime
        check_command                   check_nrpe!check_remote_container_uptime!-a '--user deltamro --password F@c3B00k --url http://localhost:9092/jolokia --mbean java.lang:type=Runtime --attribute Uptime'
        }
define service{
        use                             generic-service
        host_name                       alphprdfuse1i
        service_description             Container Delta FADEC Uptime
        check_command                   check_nrpe!check_remote_container_uptime!-a '--user deltafadec --password B@dM0nk3y --url http://localhost:9093/jolokia --mbean java.lang:type=Runtime --attribute Uptime'
        }

#Open File Descriptors
define service{
        use                             generic-service
        host_name                       alphprdfuse1i
        service_description             Container PassThru File Descriptors
        check_command                   check_nrpe!check_remote_container_open_file_descriptors!-a '--user passthru --password B@dC0mpany --url http://localhost:9090/jolokia --mbean java.lang:type=OperatingSystem --attribute OpenFileDescriptorCount --warning 500 --critical 600'
        }
define service{
        use                             generic-service
        host_name                       alphprdfuse1i
        service_description             Container IPRCMT1 File Descriptors
        check_command                   check_nrpe!check_remote_container_open_file_descriptors!-a '--user iprcmtx --password G00gl3M3 --url http://localhost:9091/jolokia --mbean java.lang:type=OperatingSystem --attribute OpenFileDescriptorCount --warning 500 --critical 600'
        }
define service{
        use                             generic-service
        host_name                       alphprdfuse1i
        service_description             Container Delta MRO File Descriptors
        check_command                   check_nrpe!check_remote_container_open_file_descriptors!-a '--user deltamro --password F@c3B00k --url http://localhost:9092/jolokia --mbean java.lang:type=OperatingSystem --attribute OpenFileDescriptorCount --warning 500 --critical 600'
        }
define service{
        use                             generic-service
        host_name                       alphprdfuse1i
        service_description             Container Delta FADEC File Descriptors
        check_command                   check_nrpe!check_remote_container_open_file_descriptors!-a '--user deltafadec --password B@dM0nk3y --url http://localhost:9093/jolokia --mbean java.lang:type=OperatingSystem --attribute OpenFileDescriptorCount --warning 500 --critical 600'
        }

#Container Context State
define service{
        use                             generic-service
        host_name                       alphprdfuse1i
        service_description             Container PassThru Context State
        check_command                   check_nrpe!check_remote_container_context_state!-a '--user passthru --password B@dC0mpany --url http://localhost:9090/jolokia --mbean org.apache.karaf:type=admin,name="PassThru MultiTenant" --attribute Instances --path "PassThru MultiTenant"/State --critical' 'Started'
        }
define service{
        use                             generic-service
        host_name                       alphprdfuse1i
        service_description             Container IPRCMT1 Context State
        check_command                   check_nrpe!check_remote_container_context_state!-a '--user iprcmtx --password G00gl3M3 --url http://localhost:9091/jolokia --mbean org.apache.karaf:type=admin,name="Multi-Tenant I MEP Service" --attribute Instances --path "Multi-Tenant I MEP Service"/State --critical' 'Started'
        }
#/check_jmx4perl --user passthru --password B@dC0mpany --url http://localhost:9092/jolokia --mbean org.apache.karaf:type=admin,name="Delta Maintenance Repair and Overhaul - MRO MEP" --attribute Instances --path 'Delta Maintenance Repair and Overhaul - MRO MEP'/State --critical '!Started'

define service{
        use                             generic-service
        host_name                       alphprdfuse1i
        service_description             Container Delta MRO Context State
        check_command                   check_nrpe!check_remote_container_context_state!-a '--user deltamro --password F@c3B00k --url http://localhost:9092/jolokia --mbean org.apache.karaf:type=admin,name="Delta Maintenance Repair and Overhaul - MRO MEP" --attribute Instances --path "Delta Maintenance Repair and Overhaul - MRO MEP"/State --critical' 'Started'
        }
define service{
        use                             generic-service
        host_name                       alphprdfuse1i
        service_description             Container Delta FADEC Context State
        check_command                   check_nrpe!check_remote_container_context_state!-a '--user deltafadec --password B@dM0nk3y --url http://localhost:9093/jolokia --mbean org.apache.karaf:type=admin,name="GE-IP Delta FADEC PROD ENV" --attribute Instances --path "GE-IP Delta FADEC PROD ENV"/State --critical' 'Started'



examples showing how it works and doesn't with the mbeans using jmx4perl for testing.

./jmx4perl http://localhost:9090/jolokia read java.lang:type=Runtime StartTime
1563297082466

./jmx4perl http://localhost:9090/jolokia read java.nio:name=direct,type=BufferPool Count
19

NOW attempting a camel route
./jmx4perl http://localhost:9090/jolokia read org.apache.camel:context=passthrumt1.core-com.ge.digital.passthru.coreCamelContext,type=context,name="com.ge.digital.passthru.coreCamelContext" ExchangesTotal
ERROR: javax.management.InstanceNotFoundException : org.apache.camel:context=passthrumt1.core-com.ge.digital.passthru.coreCamelContext,type=context,name=com.ge.digital.passthru.coreCamelContext

it just doesn't seem like jmx is exposing the camel routes? the above example should return a count.


Solution

  • I just stumpled on to something, more syntax related than anything. don't understand it, but, it is a break through, can build from this. placing single quote ' around the MBean seems to work.

    ./jmx4perl http://localhost:9090/jolokia read 'org.apache.camel:context=passthrumt1.core-com.ge.digital.passthru.coreCamelContext,type=context,name="com.ge.digital.passthru.coreCamelContext"'
        {
          AllowUseOriginalMessage => '[false]',
          ApplicationContextClassName => 'BundleDelegatingClassLoader(passthrumt1.core [309])',
          CamelId => 'com.ge.digital.passthru.coreCamelContext',
          CamelVersion => '2.17.0.redhat-630310',
          ClassResolver => 'org.apache.camel.core.osgi.OsgiClassResolver',
          DeltaProcessingTime => 0,
          ExchangesCompleted => 5836,
          ExchangesFailed => 0,
          ExchangesInflight => 0,
          ExchangesTotal => 5836,
          ExternalRedeliveries => 0,
          FailuresHandled => 0,
          FirstExchangeCompletedExchangeId => 'ID-alphprdfuse2i-45162-1563297115702-3-3',
          FirstExchangeCompletedTimestamp => '2019-07-16T13:12:00-04:00',
          FirstExchangeFailureExchangeId => undef,
          FirstExchangeFailureTimestamp => undef,
          InflightExchanges => 0,
          LastExchangeCompletedExchangeId => 'ID-alphprdfuse2i-45162-1563297115702-3-11672',
          LastExchangeCompletedTimestamp => '2019-07-17T13:30:30-04:00',
          LastExchangeFailureExchangeId => undef,
          LastExchangeFailureTimestamp => undef,
          LastProcessingTime => 0,
          Load01 => '',
          Load05 => '',
          Load15 => '',
          ManagementName => 'passthrumt1.core-com.ge.digital.passthru.coreCamelContext',
          ManagementStatisticsLevel => 'Default',
          MaxProcessingTime => 271,
          MeanProcessingTime => 0,
          MessageHistory => '[true]',
          MinProcessingTime => 0,
          PackageScanClassResolver => 'org.apache.camel.core.osgi.OsgiPackageScanClassResolver',
          Properties => {
            'http.proxyHost' => 'PITC-Zscaler-Americas-Cincinnati3PR.proxy.corporate.gtm.ge.com',
            'http.proxyPort' => '80'
          },
          Redeliveries => 0,
          ResetTimestamp => '2019-07-16T13:11:58-04:00',
          ShutdownNowOnTimeout => '[true]',
          StartTimestamp => '2019-07-16T13:11:58-04:00',
          StartedRoutes => 6,
          State => 'Started',
          StatisticsEnabled => '[true]',
          TimeUnit => 'SECONDS',
          Timeout => 300,
          TotalProcessingTime => 3744,
          TotalRoutes => 8,
          Tracing => '[true]',
          Uptime => '1 day',
          UptimeMillis => 87522386,
          UseBreadcrumb => '[true]',
          UseMDCLogging => '[false]'
        }
    
    ./jmx4perl http://localhost:9090/jolokia read 'org.apache.camel:context=passthrumt1.core-com.ge.digital.passthru.coreCamelContext,type=context,name="com.ge.digital.passthru.coreCamelContext"' ExchangesCompleted
    5844
    
    ./check_jmx4perl --user passthru --password B@dC0mpany --url http://localhost:9090/jolokia --mbean 'org.apache.camel:context=passthrumt1.core-com.ge.digital.passthru.coreCamelContext,type=context,name="com.ge.digital.passthru.coreCamelContext"' --attribute ExchangesCompleted
    OK - [org.apache.camel:context=passthrumt1.core-com.ge.digital.passthru.coreCamelContext,type=context,name="com.ge.digital.passthru.coreCamelContext",ExchangesCompleted] : Value 5852 in range | [org.apache.camel:context#passthrumt1.core-com.ge.digital.passthru.coreCamelContext,type#context,name#"com.ge.digital.passthru.coreCamelContext",ExchangesCompleted]=5852;;