How To: Enable debugging for Jaguar (Engine)
Sometimes we will need to get a log file to determine what is going on in the monitoring engine. The main log file is in the main monitor engine directory, and is named monitorengine.log. There are a couple of different ways to turn on logging as well as different levels and components. Our logging system is based on the log4j logging componenet. More information about log4j can be found here: http://logging.apache.org/log4j/
The easiest way to turn on debugging is to simply issue the following command:xmlApiClient -o system.logging.priority -v DEBUG
Here are some guidelines to use with debug logging….
1. LOG LEVEL PRIORITY
There are several different priority levels of logging. The default log level the engine ships with is “INFO”. Redpaytoveling . This logs all informational messages to the log and the database.
Levels include ERROR, WARNING, INFO, DEBUG. ERROR will give the least amount of logging, while DEBUG will give the most. relevant domains . When we are debugging the product, you will need to enable the DEBUG priority.
There are two ways to change the priority. On a running engine, you may issue the command:system.logging.priority -v <LEVEL>
In this case, to turn on debugging, you would issue:system.logging.priority -v DEBUG
Another way would be to modify the monitorengine/log4j.xml file directly. In the last section of the file, you will see:<root>
<priority value =”info” />
Change the line:<priority value =”info” />
to:<priority value =”debug” />
and save the file. The monitor engine will have to be restarted for it to take effect.
2. MONITOR DEBUG LEVEL
This affects the amount of DEBUGGING information ONLY. The level of 1 will log the least amount of information and the level of 10 will log the most amount of ingformation. 5 is a good amount.
To adjust this value on the fly, issue the command:system.logging.level -v <LEVEL>
To adjust this to a value of 6, issue the command:system.logging.level -v 6
The other way to modify this value is to edit the engineconfig.properities file.
The following value (monitor_debug_level) must be modified. For example, to set it to 5, make sure the line reads:monitor_debug_level=5
3. LOG COMPONENT
You can control which component that the engine performs debug logging for. It is controlled by the following command: system.logging.component
The valid values for components are:
ALL = ALL
MRM = Monitor Results Manager
PE = Poller Engine
DE = Discover Engine
OE = Output Engine
NE = Notifier Engine
RAE = Results Analysis Engine
SP = Symbol Processor
PM = Ping Monitor
PB_SNMP = Poller Blade (SNMP)
To turn on debugging for the only the Discover Engine, for example, first enable debugging, and then specify the DE component:xmlApiClient -o system.logging.priority -v DEBUG xmlApiClient -o system.logging.component -v DE
To enable debugging for more than one component, use the comma separator. For example to debug the poller and the symbol processor, specify:
xmlApiClient -o system.logging.component -v PE,SP