...
Expand |
---|
title | Method 1: Configure from conf file |
---|
|
Configure from the /home/jsm/jec/conf/integration.conf file. This overwrites any configuration you previously made in the script. |
Expand |
---|
title | Method 2: Configure by using Golang flags |
---|
|
Configure by entering flags into the command in the jsm.cfg file. Use -apiKey flag for your apiKey and -ns flag for nagios_server name. If multiple OP5 servers are not in use, there is no need to define the nagios server. Using flags overwrites all the other configuration methods discussed earlier in the article. Configure the apiKey from the cfg file as follows: Code Block |
---|
define command {
command_name notify-service-by-jsm
command_line /home/jsm/jec/scripts/send2jsm -apiKey="apiKey1" -entityType=service ...
} |
When apiKey is added to the cfg file, it overrides the apiKey in the config.json file. To send additional custom arguments, add them after the flags. For example, customArgName1 customArgValue1 customArgName2 customArgValue2 . Parse custom arguments by adding {{_payload.customArgName}} to wherever is needed in the input fields. To learn more about using raw parameters, see dynamic fields. |
...
If unsure of the problem, set the JEC's script log level to debug, “debug” and try again, and contact us and share . Contact us with the log files found under /var/log/jsm/.
...