Árvore de páginas

Contents

Objective

The objective of this guide is to provide instructions on the installation and use of the service monitoring module of TOTVS Fluig Platform.

This module allows customers to monitor services and perform queries of various reports related to services consumed by TOTVS Fluig Platform.

Installation and Configuration

To install the module, it is necessary to request that the .war module be published manually in the application server, since it is not enabled by default in the Fluig installation wizard. No additional configuration is required.

Please note that there is no access control to the monitor. To restrict this access, the application server must be removed after use.

Follow these steps below:

  • Download the monitor.war file - Version 1.3.8 - Updated on 10/03/2014.
  • Copy the file to "<Diretório de instalação>/jboss/apps" .
  • Await the deployment of the .war file and access the URL "http://<host>/monitor/report" to confirm that the installation was successful.

Operation

The monitoring module enables the query of a series of reports related to services used by Fluig. These information is useful for debugging any problems that may be occurring in TOTVS Fluig Platform. The reports may be accessed through a Rest API (that returns a JSON) and via JMX. First let’s summarize each of the monitored services.

Monitored Services

The following is a list with the name of all monitors and their monitored services. Some services may take parameters, we'll talk more about their use in the next items.

Warning

Icon

Anytime a monitor returns UNKNOWN or FAILURE , it is possible to access the file "<Diretório de instalação>/jboss/standalone/logs/server.log" to obtain detailed information of the error.

ConnectedUsersMonitor

Indicates the number of active user sessions in the portal.

Parameters: 

  • jmxPort=<parâmetro> JMX Access port.

    Note

    Icon

    The default JMX access port is 9999.

Returns:

  • Number of active sessions in the portal;
  • UNKNOWN: An unexpected error occurred while the report was generated.

DatabaseAvailabilityMonitor

Indicates whether the base used by Fluig is available.

Returns:

  • OK: Database available;
  • FAILURE: Database is not available;

DatabaseSizeMonitor

Indicates the total size of the database used by Fluig.

Returns:

  • Total size of the database;
  • FAILURE: An error occurred while retrieving the database size.
  • UNSUPPORTED: Database used is not supported for this monitor.

DatabaseTrafficMonitor

Indicates the total sent plus received traffic of the database used by TOTVS Fluig Platform.

Returns:

  • Sent plus received traffic of the database;
  • FAILURE: An error occurred while retrieving the sent and received data of the database.
  • UNSUPPORTED: Database used is not supported for this monitor.

GoodDataAvailabilityMonitor

Indicates the availability of Fluig Analytics (http://analytics.fluig.com/).

Returns:

  • OK: Available Fluig Analytics service;
  • FAILURE: Unable to access the Fluig Analytics address;
  • UNKNOWN: An unexpected error occurred while the report was generated.

IdentityAvailabilityMonitor

Indicates whether the Identity homepage may be accessed.

Returns:

  • OK: Identity homepage accessible;
  • FAILURE: Unable to access the Identity homepage;
  • UNKNOWN: An unexpected error occurred while the report was generated.

IdentityConfigurationMonitor

Indicates whether the configuration in standalone.xml of Identity is active.

Returns:

  • OK: Identity is active;
  • FAILURE: Identity is not active;

LicenseServerAvailabilityMonitor

Indicates whether the license server is available.

Returns:

  • OK: Licenses server available;
  • FAILURE: Licenses server is not available.

LogDirSizeMonitor

Indicates the size of the log directory of the server.

Return:

  • Size of the log directory of the application server.

MailServerAvailabilityMonitor

Sends a test e-mailto [email protected], to indicate the availability of e-mail service.

Parameters: 

  •  toAddress=<parâmetro> Target e-mail of test.

Returns:

  • OK: E-mail service available;
  • FAILURE: Unable to send the test e-mail.

MemcachedAvailabilityMonitor

Indicates the availability of cache server.

Returns:

  • OK: Cache server is available.
  • FAILURE: Cache server is not available.

MemcachedConfigurationMonitor

Indicates whether the configuration of the cache server address, in standalone.xml, is defined to something other than "LOCAL_MAP".

Returns:

  • OK:  Cache server address is configured;
  • FAILURE: Cache server address is not configured.

NodeJSAvailabilityMonitor

Indicates whether the NodeJS server is active.

Returns:

  • OK: NodeJS server is active;
  • FAILURE: NodeJS server is not active;

OpenOfficeServerAvailabilityMonitor

Indicates whether the OpenOffice server is active.

Returns:

  • OK: OpenOffice server is active;
  • FAILURE: OpenOffice server is not active;

SolrServerAvailabilityMonitor

Indicates whether the Solr server is active.

Returns:

  • OK: Solr server is active;
  • FAILURE: Solr server is not active;

TemplateDirSizeMonitor

Indicates the size of template directory.

Parameters: 

  • tenantId=<parâmetro> Size of tenant ID to be calculated.

Returns:

  • Size of Fluig template directory.
  • FAILURE: An error occurred while retrieving the size of Fluig template directory.

TemporaryDirSizeMonitor

Indicates the size of temporary directory of server.

Return:

  • Size of the temporary directory of application server.

VolumeDirSizeMonitor

Indicates the size of the volume directory.

Parameters: 

  • tenantId=<parâmetro> Size of tenant ID to be calculated.

Returns:

  • Size of Fluig volume directory.
  • FAILURE: An error occurred while retrieving the size of Fluig volume directory.

 

REST Access

There are two ways to access services through the REST interface:

Method URL Explanation
GET http://<host>/monitor/report Returns a consolidated report of all monitors, without the use of parameters.
GET http://<host>/monitor/report/<service_name>[?<parameter_name>]

Returns the report for a specific service. Query parameters may be sent for this call.

General Considerations:

  • <service_name> = Name of service without the suffix Monitor and with the first letter in lower case. Example: Monitor TemporaryDirSizeMonitor > temporaryDirSize.
  • <parameter_name> = Name of parameter for the service and its value. Example: http://<host>/monitor/report/volumeDirSize?tenantId=2.
  • If a parameter is sent to a monitor that does not have parameters, or if this parameter fails when generating its report for any reason, it will return the value "UNKNOWN".
  • The returns are always Strings.
Figure 1: Example of a consolidated transaction.
Figure 2: Example of a parametrized query.

JMX Access

The following interface is used to access the monitors via JMX:

@MXBean
public interface FluigServiceMonitor {
    /**
     * 
     * Generates the report for this monitor with given parameters. The parameter syntax is:
     * 
     * paramenterName1=value1 parameterName2=value2
     * 
     * Example: "tenantId=10 forceSearch=true maxResults=15"
     * 
     * @param parameter for the monitor report
     * @return report result
     * @throws UnsupportedOperationException if this monitor doesn't support parameters.
     */
    String report(String parameter) throws UnsupportedOperationException;
    /**
     * Generates the report for this monitor.
     * 
     * @return report result.
     */
    String report();
    /**
     * Returns the name of this monitor, usually the class name without the "Monitor" suffix
     * 
     * @return name of this monitor.
     */
    String getName();
}

The MXBeans are registered with the following name in the same JVM of the application server:

com.fluig.monitor.jmx.bean:type=<Nome do Monitor>

Example:

com.fluig.monitor.jmx.bean:type=ConnectedUsersMonitor

With this information, just access the JMXBeans, without having to use an external library with the interface. Since the returns and parameters are OpenTypes (Strings), no external dependencies are necessary.

 

Figure 3: Example of access to JMX Beans through JConsole.

 

Parameters: 

  • jmxPort=<parâmetro> JMX Access port.

    Note

    Icon

    The default JMX access port is 9999.

Returns: