Page 2 of 2
Re: Force overwrite on import of configurations
Posted: Wed Jan 25, 2017 9:03 am
by WillemDH
Hmmm experimented a bit with the api, but can't find a way to enable additive inheritance for contacts. Anyone an idea if this is possible yet? I tried putting a '+' before the contact but it doesn't seem to work.
curl -XPOST "
https://srvnagios01.gentgrp.gent.be/nag ... y&pretty=1" -d "host_name=srvcon01&address=srvcon01&use=dig_windows_server_prio2&contacts=+nagiosadmin¬ification_period=xi_timeperiod_24x7&force=1"
EDIT: Found it, it works with %2B
Re: Force overwrite on import of configurations
Posted: Wed Jan 25, 2017 9:06 am
by BanditBBS
WillemDH wrote:Hmmm experimented a bit with the api, but can't find a way to enable additive inheritance for contacts. Anyone an idea if this is possible yet? I tried putting a '+' before the contact but it doesn't seem to work.
curl -XPOST "
https://srvnagios01.gentgrp.gent.be/nag ... y&pretty=1" -d "host_name=srvcon01&address=srvcon01&use=dig_windows_server_prio2&contacts=+nagiosadmin¬ification_period=xi_timeperiod_24x7&force=1"
Instead of + use %2B and try again. Not 100% sure it's going to work, but have to html encode for sure.
Re: Force overwrite on import of configurations
Posted: Wed Jan 25, 2017 9:07 am
by WillemDH
Just found it bandit. Tx! It works with %2B indeed
Re: Force overwrite on import of configurations
Posted: Wed Jan 25, 2017 9:09 am
by BanditBBS
WillemDH wrote:Just found it bandit. Tx! It works with %2B indeed
I use the heck out of this page:
http://meyerweb.com/eric/tools/dencoder/
It just doesn't encode the ! which isn't an issue in this case, but is when I encode sql stuff. ! is %21 which I found here:
http://www.w3schools.com/tags/ref_urlencode.asp
Re: Force overwrite on import of configurations
Posted: Wed Jan 25, 2017 9:53 am
by WillemDH
I'm using
https://cyberchef.outsideit.net/ for that.
How would I create a passive service with stalking options o,w,c,u?
Grtz
Willem
Re: Force overwrite on import of configurations
Posted: Wed Jan 25, 2017 4:45 pm
by rkennedy
I read through the post, and it looks like there has been some work happening. I do see the mention of having a feature though Willem - would you like anything filed?
From what I read, I take it as a possible feature request to delete an existing host, and all services, and then overwrite 'cleanly' with the new config.