Monitoring DirX Audit with JMX
This chapter describes how to monitor DirX Audit with JMX, including how to monitor:
-
DirX Audit Server components
-
DirX Audit Message Broker
Monitoring DirX Audit Server Components
DirX Audit Server components contain three collector types and support units for the message processing in collectors. DirX Audit Server can monitor the collectors and selected support units (error storage, persistence unit and splitter) using Java Management Extensions (JMX), a set of specifications used for network and application management. For more information on collectors, see the chapters “Managing DirX Audit Server” and “Configuring DirX Audit Collectors” in this guide. For more information on error handling, see the chapter “Managing DirX Audit Server Error Handling” in this guide.
Managed Beans for DirX Audit Server Monitoring
Managed beans are used to provide access to DirX Audit Server component monitoring. Each tenant application has managed beans for monitoring of the error handling component, the persistence component, and for monitoring of collectors. Each collector is configured for the chosen DirX product.
The monitoring beans are:
-
DxtSrvErrorStorageMBean – the error storage bean that holds statistics about different types of errors occurring in the processing of records from File, JMS and LDAP collectors.
-
DxtSrvPersistenceMBean – the monitoring bean for the Persistence unit that holds the number of audit messages persisted in the DirX Audit Database and statistics about the splitter component that splits entries into separate audit messages. It also provides information about the state of the connection to the database.
-
DxtSrvFileCollectorMBean – the monitoring bean from the File collector that gives access to route statistics. The statistics concentrate on whole exchanges between the File collector and the Persistence unit. An exchange can contain one or more audit messages.
-
DxtSrvJmsCollectorMBean – the monitoring bean for the JMS collector that gives access to route statistics. The statistics concentrate on whole exchanges between the JMS collector and the Persistence unit. An exchange can contain one or more audit messages.
-
DxtSrvLdapCollectorMBean – the monitoring bean for the LDAP collector that gives access to route statistics. The statistics concentrate on whole exchanges between the collector and the Persistence unit and on the number of records contained in these exchanges. An exchange can contain one or more audit messages.
DirX Audit Server Component Attributes to Monitor
This section describes some important attributes of DirX Audit Server components that can be monitored.
Error Handling Attributes
Error handling attributes that can be monitored include:
-
NumberOfProcessedErrors – the total number of errors processed by the error storage unit, including the following ones
-
NumberOfProcessedErrorsDuplicates – the number of duplicates processed by the error storage unit
-
NumberOfProcessedErrorsNonRecoverable – the number of non-recoverable errors processed by the error storage unit
-
NumberOfProcessedErrorsRecoverable – the number of recoverable errors processed by the error storage unit
Common Statistics for Collectors and the Persistence Unit
Common statistics attributes for File, JMS and LDAP collectors and the Persistence unit that can be monitored include:
-
ExchangesCompleted – the number of completed exchanges in the collector. In this context, the exchange represents the whole route from the collector to the Persistence unit.
-
ExchangesFailed – the number of failed exchanges
-
ExchangesInflight – the number of exchanges currently being processed
-
FailuresHandled – the number of handled failures; for example, the handling of duplicate messages
-
LastProcessingTime – the time in milliseconds needed for processing the last exchange
-
MaxProcessingTime – the maximum processing time from all processed exchanges
-
MeanProcessingTime – the mean processing time of all processed exchanges
-
MinProcessingTime – the minimum processing time from all processed exchanges
-
TotalProcessingTime – the total processing time of all processed exchanges
LDAP Collector Attributes
LDAP collector attributes to monitor include:
-
ProcessedEntries – the number of all processed original audit messages from all processed exchanges
-
RecordsSent – the number of audit messages sent to the database
-
Connected – the connection status to the LDAP server
-
LastConnectedTimestamp – the timestamp when the LDAP collector was last connected to the LDAP server
-
LastConnectionCheckedTimestamp – the timestamp when the LDAP connection was last checked
Persistence Unit and Splitter Attributes
Persistence unit and splitter attributes that can be monitored include:
-
TotalProcessedMsgCount – the number of messages processed by the Persistence unit that were not processed by the error storage unit
-
Connected – the connection status to the database
-
LastConnectedTimestamp – the timestamp when a record was last sent to the database
-
LastConnectionCheckedTimestamp – the timestamp when a connection status was last checked
Monitoring DirX Audit Server Components with JConsole
Monitoring statistics can be accessed using JConsole, a part of the Java Virtual Machine that provides a graphical user interface for monitoring of components in each DirX Audit Server tenant-specific application. Each tenant has configured separate access to remote monitoring. Connection URL and credentials are needed to access the statistics:
-
The server monitoring URL is: service:jmx:rmi:///jndi/rmi://127.0.0.1:300xx/jmxrmi
-
The port, JMX username and password were set with the Tenant Configuration Wizard in the Application Container Configuration step. The port is specific for each tenant. The value is selected by default from the range 30091 – 300xx.
On the left side of JConsole for each tenant application is the monitor package name: com.dirxcloud.audit.management.server. Each tenant has a group of managed beans corresponding with collectors configured on the tenant and labeled with the tenant identifier in the beginning of each managed bean name. In addition, each tenant has one MXBean that provides access to the individual collector managed beans through attributes and operations.
Here is an example of the name for the DirX Identity File collector MBean in JConsole:
1c523d49-bcf9-40b7-973d-93894ab0bb24.DxtSrvLdapCollectorMBean.dxi
Each component bean has a group of attributes for monitoring DirX Audit Server components. Some of these attributes are mentioned in the section “DirX Audit Server Component Attributes to Monitor”.
Monitoring DirX Audit Server Components with dxt_mgmt_check
The monitoring command-line tool dxt_mgmt_check is provided with the DirX Audit installation. It allows administrators to read monitoring managed beans and gives access to statistics for each managed bean. Nagios IT monitoring software can be set up to use this tool to collect statistics.
Common Options
Common options include:
-h or --help – show this help message and exit.
-p or --password password – connection credentials – password
-P – connection credentials – password – interactive input
-t or --tenantid tenantid – tenant ID
-u or --user username – connection credentials – username
-U or --url url – connection URL
-v or --verbose – be verbose during execution
-V or --version – print version information and exit
Options for commands get_bean_attributes and get_value:
-A or --attribute attribute_name – attribute name; see the get_bean_attributes command for a list of valid attribute names
-B or --bean bean – bean name, see the get_beans command for a list of valid bean names
-T or --type product_type – DirX product type, see the get_product_types command for a list of basic DirX product types
Commands
Commands are:
get_bean_attributes – gets all statistics accessible from the bean
get_beans – gets all available beans
get_product_types – gets the DirX product types: dxi (DirX Identity), dxa (DirX Access), dxt (DirX Audit)
get_scopes – gets the available time scopes
get_value – get the value of a specific attribute from a specific bean
Here is an example for getting all available attributes in the File collector MBean for DirX Identity:
dxt_mgmt_check
-p password
-t 1c523d49-bcf9-40b7-973d-93894ab0bb24
-u user
-U service:jmx:rmi:///jndi/rmi://127.0.0.1:30091/jmxrmi
get_bean_attributes
-B DxtSrvFileCollectorMBean
-T dxi
Monitoring DirX Audit Message Broker
This section describes how to monitor DirX Audit Message Broker with JConsole and describes some important component attributes to monitor.
Monitoring DirX Audit Message Broker with JConsole
Monitoring statistics for the DirX Audit Message Broker can be accessed using JConsole, the JMX graphical user interface. To access the statistics, you need the connection URL and credentials:
-
The broker monitoring URL is: service:jmx:rmi:///jndi/rmi://127.0.0.1:30699/jmxrmi
-
The JMX username and password were set with the Core Configuration Wizard in the Message Broker System Service step.
On the left side of the JConsole is the monitor package name: org.apache.activemq. This package contains attributes common to the whole DirX Audit Message Broker and specific attributes for each queue.
DirX Audit Message Broker Attributes to Monitor
Common attributes for DirX Audit Message Broker:
-
CurrentConnectionsCount, TotalConnectionsCount
-
UptimeMillis, MemoryLimit, DataDirectory
-
Queues, QueueSubscribers
-
TotalConsumerCount, TotalMessageCount, TotalEnqueueCount, TotalDequeueCount
-
MinMessageSize, MaxMessageSize, AverageMessageSize
Common attributes for DirX Audit Message Broker health:
-
CurrentStatus
Attributes for queue:
-
Name
-
QueueSize
-
CurrentConnectionsCount
-
ProducerCount, ConsumerCount
-
EnqueueCount, DequeueCount
-
MinEnqueueTime, MaxEnqueueTime, AverageEnqueueTime
-
MinMessageSize, MaxMessageSize, AverageMessageSize, StoreMessageSize
For more information on Apache ActiveMQ monitoring with JMX, see its documentation at https://activemq.apache.org/jmx.html.