Ad Widget

Collapse

HowTo implement custom JMX check - zabbix v4.2 - #1

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bostjans
    Junior Member
    • Apr 2019
    • 1

    #1

    HowTo implement custom JMX check - zabbix v4.2 - #1

    Hi. I would like to implement custom JMX Check with Zabbix v4.2.

    I can not get it working properly .. would need some info./help/..

    The same check I had in Icinga with definition:
    --
    apply Service "JMX:ePeroTest:ProcessStatus" {
    import "generic-service"
    check_command = "check_jmx"
    max_check_attempts = 10
    check_interval = 2m
    retry_interval = 2m
    notes = "ePero TEST JMX Check for process status;"
    vars.service_url = "service:jmx:rmi:///jndi/rmi://" + host.address + ":9010/jmxrmi"
    vars.object_name = "com.setcce.monitoring:type=Monitor"
    vars.operation_name = "getStatus"
    vars.operation_param = ";"
    vars.warn = "1"
    vars.crit = "2"
    --

    In Zabbix my JMX Item definition is:
    --
    Type: JMX Agent
    Key: jmx["com.setcce.monitoring:type=Monitor,name=getStatus ",P ";"]
    JMX EndPoint: service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi
    --

    At the moment Zabbix alwazy report:
    --
    Object or attribute not found.
    --

    From this I have some questions:
    Q. Is there any command line util, that I would test my JMX MBean (so not via Zabbix Web IFace)?
    -> .. so that I can see, if my JMX MBean is "compatible" with Zabbix;
    Q. Any sample (code) that some-one already implemented "custom JMX" probe?
    Q. Any other "generic" option to query (probe) custom checks?


    Additional data:
    -> from check_jmx util (used in Nagios/Icinga) the sample result is:
    --
    # ./check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.3.36:9010/jmxrmi -O com.setcce.monitoring:type=Monitor -Oper getStatus -P ";"
    JMX CRITICAL | OK
    --
  • bike4fun
    Junior Member
    • Oct 2019
    • 1

    #2
    I have been wonder the same thing recently. For some reason Im not able to get the Sessions working with the templates provided by zabbix for jmx tomcat monitoring. Where you ever able to figure out your problem?

    Comment

    Working...