...
Expand |
---|
title | Method 2: Configure by using Golang flags |
---|
|
Configure by entering flags to command in the jsm.cfg file. Use -apiKey flag for your apiKey and -ns flag for the nagios_server name. If you don't have multiple Nagios servers, you don't have to define the Nagios server. Using flags overwrites all the other configuration methods mentioned earlier. Configure the apiKey from the jsm.cfg file as follows (in JSON format): Code Block |
---|
define command {
command_name notify-host-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 integration.conf 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. |
Expand |
---|
title | Method 3: Configure from script |
---|
|
Configure apiKey and nagios_server from the send2jsm.go script. Build the script again and put the new executable into the /home/jsm/jec/scripts directory. Learn more about the location of the send2jsm.go and how to build a go script in the “Source and recompiling send2jsm” section in this article. |
...
Explore integration actions
Add integration rules
https://operations-help.atlassian.net/l/cp/LGQEmX9J