|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (7)
View Page History command_line /usr/lib/nagios/plugins/check_jmx -U service:jmx:rmi:///jndi/rmi://$HOSTADDRESS$:$_HOSTJMXPORT$ -O org.apache.activemq:BrokerName=$ARG1$,Type=Queue,Destination=$ARG2$ -A EnqueueCount -w '$ARG3$' -c '$ARG4$'
}
}
{code}
h2. ActiveMQ host template
A best practice to an ActiveMQ nodes is to create a template 'ActiveMQ host' that inherites from the 'JVM host'.
According to our environment defined above, create the file 'activemq-nagios2.cfg' in the directory '/etc/nagios3/conf.d' with the following content:
According to our environment defined above, create the file 'activemq-nagios2.cfg' in the directory '/etc/nagios3/conf.d' with the following content:
{code}
define host{
use jvm-host
name activmq-host ; The name of this host template
notifications_enabled 1 ; Host notifications are enabled
event_handler_enabled 1 ; Host event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
failure_prediction_enabled 1 ; Failure prediction is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
check_command check-host-alive
max_check_attempts 10
notification_interval 0
notification_period 24x7
notification_options d,u,r
contact_groups admins
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
use jvm-host
name activmq-host ; The name of this host template
notifications_enabled 1 ; Host notifications are enabled
event_handler_enabled 1 ; Host event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
failure_prediction_enabled 1 ; Failure prediction is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
check_command check-host-alive
max_check_attempts 10
notification_interval 0
notification_period 24x7
notification_options d,u,r
contact_groups admins
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
# Specific attributes
_jmxport 1099 ; Listening port of the JVM JMX agent
}
_jmxport 1099 ; Listening port of the JVM JMX agent
}
define hostextinfo{
name activemq-node
notes Petals ESB - SE ASE - ActiveMQ node
icon_image base/activemq.jpg
icon_image_alt Petals ESB/Node
vrml_image base/activemq.jpg
statusmap_image base/activemq.jpg
}
name activemq-node
notes Petals ESB - SE ASE - ActiveMQ node
icon_image base/activemq.jpg
icon_image_alt Petals ESB/Node
vrml_image base/activemq.jpg
statusmap_image base/activemq.jpg
}
{code}
h2. Defining your ActiveMQ hosts
For the ActiveMQ node of your Petals ESB topology, create an instance of the template 'activemq-host'.
According to our environment defined above, create the file 'activemq-host-node1.cfg' in the directory '/etc/nagios3/conf.d' with the following content:
{code}
define host{
use activemq-host ; Name of host template to use
host_name activemq-node
alias Petals ESB - SE ASE - ActiveMQ node
address 127.0.0.1
_jmxport 1099 ; This value should be set with the JMX
; agent listener port of your ActiveMQ node.
}
{code}
h2. ActiveMQ host services
According to our environment defined above, create the file 'activemq-services.cfg' in the directory '/etc/nagios3/conf.d' with the following content:
{code}
# Define a service to check the queue size of an ActiveMQ queue used by the SE ASE
define service{
host_name activemq-node
service_description se-ase-queue-size
check_command activemq_queue_size!testQueue!10!50
use generic-service
}
# Define a service to check the traffic of an ActiveMQ queue used by the SE ASE
define service{
host_name activemq-node
service_description se-ase-traffic
check_command activemq_queue_size!testQueue!500!1000
use generic-service
}
{code}
h2. Defining your ActiveMQ hosts
For the ActiveMQ node of your Petals ESB topology, create an instance of the template 'activemq-host'.
According to our environment defined above, create the file 'activemq-host-node1.cfg' in the directory '/etc/nagios3/conf.d' with the following content:
{code}
define host{
use activemq-host ; Name of host template to use
host_name activemq-node
alias Petals ESB - SE ASE - ActiveMQ node
address 127.0.0.1
_jmxport 1099 ; This value should be set with the JMX
; agent listener port of your ActiveMQ node.
}
{code}
h2. ActiveMQ host services
According to our environment defined above, create the file 'activemq-services.cfg' in the directory '/etc/nagios3/conf.d' with the following content:
{code}
# Define a service to check the queue size of an ActiveMQ queue used by the SE ASE
define service{
host_name activemq-node
service_description se-ase-queue-size
check_command activemq_queue_size!testQueue!10!50
use generic-service
}
# Define a service to check the traffic of an ActiveMQ queue used by the SE ASE
define service{
host_name activemq-node
service_description se-ase-traffic
check_command activemq_queue_size!testQueue!500!1000
use generic-service
}
{code}
h2. Monitoring with Cacti