Hi Team,
May i know the API URL for adding the comments on particular host and service ? Using API URL.
NagiosXI API URL
Re: NagiosXI API URL
You can see an example here:
Help > REST API Docts > System Reference > POST system/corecommand
Help > REST API Docts > System Reference > POST system/corecommand
Code: Select all
curl -XPOST "http://x.x.x.x/nagiosxi/api/v1/system/corecommand?apikey=LTltbjobR0X3V5ViDIitYaI8hjsjoFBaOcWYukamF7oAsD8lhJRvSPWq8I3PjTf7" -d "cmd=ADD_HOST_COMMENT;localhost;1;%user%;This is a test comment"
{
"cmd": "ADD_HOST_COMMENT;localhost;1;nagiosadmin;This is a test comment",
"success": "Core command submitted"
}Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: NagiosXI API URL
Hi ,
i'm trying to running the below command . getting following error
Syntax : curl -XPOST "http://xxxxx/nagiosxi/api/v1/system/cor ... y=hsa7lrke" -d "cmd=ADD_HOST_COMMENT;lanpcorp01.ffx.jfh.com.au;1;nagiostosnow;This is a test comment"
output :
{
"error": "Invalid API Key"
}
But using same API key : GET command is working
i'm trying to running the below command . getting following error
Syntax : curl -XPOST "http://xxxxx/nagiosxi/api/v1/system/cor ... y=hsa7lrke" -d "cmd=ADD_HOST_COMMENT;lanpcorp01.ffx.jfh.com.au;1;nagiostosnow;This is a test comment"
output :
{
"error": "Invalid API Key"
}
But using same API key : GET command is working
Re: NagiosXI API URL
Are you running the GET command in a browser after you authenticated (logged in as the "nagiostosnow" user)? Please show us the GET command, run from the CLI along with the output of it.
What is the version of Nagios XI that you are currently using? What kind of permissions the "nagiostosnow" user has?
What is the version of Nagios XI that you are currently using? What kind of permissions the "nagiostosnow" user has?
Be sure to check out our Knowledgebase for helpful articles and solutions!