. . .

Monitoring

ApiOmat provides monitoring capabilities at all layers. For most methods, a Nagios compartible monitoring system is required.

Checking the YAMBAS service

After running, each application server provides a simple ping-like REST method to check if the service is alive (usable for load balancers, etc):

http(s)://YOURHOST/yambas/rest

YAMBAS will respond with a version number.

Furthermore, it is recommended that you create a simple app to monitor, store sample data, and use a REST call to test if data is retrieved properly.

Monitoring via ApiOmat Dashboard

Using the ApiOmat Dashboard to monitor your servers is an easy way to get an overview on different aspects of your servers like CPU and RAM usage (see screenshots). Only the SuperAdmin has access to the monitoring page.

  1. Install ApiOmat monitoring services on your servers

  2. If you need to change one of the following config values, create a config file at /opt/config/application-default.yml which includes the following yaml file used for the service configuration:

    monitoring service config
    # specify passwort for monitoring user
    security:
    user:
    password: secret
     
    # specify tomcat access here when tomcat JMX values should be parsed
    #tomcat:
    # url: http://localhost:8080
     
    # service registry URL
    eureka:
    client:
    serviceUrl:
    defaultZone: http://localhost:8761/eureka
     
    # JMX port
    jmx:
    host:localhost
    port:13991
     
    # switch to use MongoDB or memory storage
    storage:
    useMongo: true
    serverNames: localhost
     
    # MBean names to query and store
    mbean:
    names: java.lang:type=OperatingSystem,java.lang:type=Runtime,java.lang:type=Threading
     
    # Request timeout (ms) when collecting data from other monitoring nodes
    requestTimeout: 50000
  3. configure apiomat.yaml:

    apiomat.yaml monitoring settings
    monitoring:
    # URL of the service registry
    eurekaHost: http://localhost:8761
    user: user
    # Use the same password as configured for monitoring service
    password: secret
    yambas.conf monitoring settings
    eurekaHost=http://localhost:8761
    monitoringUser=user
    monitoringPassword=secret

    When the monitoring settings are configured in the yambas.conf, the option "Monitoring" is automatically added to the dashboard menu in the admin panel:

    images/download/attachments/11568358/monitoring_01.png

  4. log into ApiOmat Dashboard with the SuperAdmin Account and open the monitoring page

A restart of yambas or dashboard is not necessary.

More about running the monitoring service can be found here.

Examples

images/download/attachments/11568358/monitoring_02.png images/download/attachments/11568358/monitoring_05.png images/download/attachments/11568358/monitoring_09.png

Checking the Apache Tomcat

The jolokia plugin monitors the status of the application container. Several parameters of a web application can be observed, like

  • track the number and rate of in coming requests per second

  • number of current connections

or common checks like memory and CPU usage of the whole Tomcat.

The plugin requires Jolokia and the agent plugin on the monitored server. Jolokia works with JMX.

Checking the MongoDB

MongoDB has its own Nagios/Check_MK plugin ( check_mk_active-mongodb) where e.g.

  • replication data

  • number of connections

  • current lock

  • database size

can be monitored.

Furthermore, mongo contains several command line tools to check performance and load: http://docs.mongodb.org/manual/administration/monitoring/

* link only available in Enterprise Documentation