Member since
11-30-2017
44
Posts
6
Kudos Received
2
Solutions
08-28-2018
06:42 PM
@snukavarapu Thanks for the article, this worked great for me. Is this something you keep continuously updated? If so, what's your strategy for keeping the table updated?
... View more
07-23-2018
06:41 PM
@sbabu Getting the token this way does not work for me as there is a '%' in the password I am using, which causes curl to throw an error. How can I get around this? The script I am developing is going to be used by different people so I cannot know ahead of time to escape any special characters.
... View more
06-25-2018
05:54 PM
@Aakash Singh Did you find out how to do this on a kerberized cluster?
... View more
01-23-2018
07:00 PM
@clukasik In the last line of the script, you have alertHost s `hostname`
I am wanting to send the FQDN of the host, but if I put alertHost s `hostname -f`
the monitoring service I am sending the trap to never receives the trap at all. Why is this? Do you have any recommendations on how I can send the FQDN?
... View more
11-30-2017
04:02 PM
For anyone coming across this, I was not able to post the JSON data with the command provided and was getting the following error message. { "status" : 400, "message" : "The properties [href,items] specified in the request or predicate are not supported for the resource type AlertTarget." }
Since I already had existing alert notifications configured, I was able to use the following command. curl -u admin:$PASSWORD -iv -H 'X-Requested-By: ambari' -X POST http://$AMBARI_HOST:8080/api/v1/alert_targets -d @ambari_mib.json Here is the content of the ambari_mib.json. {
"AlertTarget" : {
"description" : "SNMP MIB Target",
"id" : 3,
"name" : "SNMP_MIB",
"notification_type" : "ALERT_SCRIPT"
}
} Just make sure you edit the "id" field to the next consecutive alert id on your system.
... View more