Check to count the amount of new messages in a messageQueue (MSGQ) according to their severity and message ID (newMessageInMessageQueue)¶
Description¶
Description | Count amount of new messages in a messageQueue (MSGQ) according to their severity and message ID. Display the new logs in output | |
Operation | Retrieves all messages and store them in a light database. Return the new messages matching criteria in the output. Ok if the number of new messages is below the warning threshold. Warning if the number of new messages is above the warning threshold. Critical if the number of new messages is above the critical threshold. | |
Used API | QGYOLMSG format LSTM0100, QGYGTLE, QGYCLST | |
Required authority | *USE on the messageQueue, *EXECUTE one the messageQueue library |
Command argument¶
Command name | Number of arguments | Arguments | ||
newMessageInMessageQueue | 6 | Arguments order | Description | Exemple |
Argument 1 | messageQueue name | /QSYS.LIB/QSYSOPR.MSGQ | ||
Argument 2 | Regex filtering message ID | ^CP.*$ | ||
Argument 3 | Minimal severity level | 60 | ||
Argument 4 | Maximal severity level Maximal severity exluded | 80 | ||
Argument 5 | Warning threshold (amount) | 1 | ||
Argument 6 | Critical threshold (amount) | 2 | ||
Metrics returned | criteriaMessage=1 newMessage=3 |
Local database configuration¶
The location of the local database can be configured in the file /etc/centreon-connector-as400/config.properties. Variable is : pathMsgQDB. /!\ Take care with the others options !
Network usage¶
Amount of message in the messageQueue | Download (as400 to connector) | Upload (connector to as400) |
1 (théorique) | 2,26 ko | 66 o |
5000 | 11 mo | 325 ko |
Configuration exemple¶
Macro name | Macro value |
CHECK | newMessageInMessageQueue |
ARGS | /QSYS.LIB/QSYSOPR.MSGQ!^CP.*$!60!80!1!2 |