Hey all,
I'm hoping this is a quick and easy solution.
I have an API on another monitoring solution that I want to run a check every so often to verify collection status (huge enterprise/multiple tools).
I'm pretty sure Web Inject is my only option in the current Nagios XI version.
I have no idea about the WebInject stuff as I've never worked with it. I can't seem to find a good example and am hoping for some help from y'all.
Here is my basic info:
url - https://othertool/api/get/adapter/ (this can be done via pyton so I know the path is right).
user - ouruser
pass - ourpass
value to match - Adapter1
So what will the xml look like? I'm not sure where to put in the user/pass info. I'm not sure what I need to do to check for success/failure.
Just some basic guidance to help me get at least one of these valuable scripts/test in place so we have a template for hundreds of other API tests our users want from us.
Thanks for any help!
Kevin
WebInject help needed to query an API with User/Password
-
kevinmjacobsen
- Posts: 34
- Joined: Thu Oct 13, 2016 8:25 am
- Location: Remote
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: WebInject help needed to query an API with User/Password
If it is http authentication you would use the following
http://www.webinject.org/manual.html#cfghttpauth
If it is session based it get more complicated
http://www.webinject.org/manual.html#sesscookie
there are some testcases for example you can refer to
http://www.webinject.org/manual.html#tcsetup
http://www.webinject.org/manual.html#cfghttpauth
If it is session based it get more complicated
http://www.webinject.org/manual.html#sesscookie
there are some testcases for example you can refer to
http://www.webinject.org/manual.html#tcsetup