Page 1 of 1

Checking Apply Config Status

Posted: Fri Apr 04, 2025 3:42 pm
by dxfuentes
Is there a way to check if configuration changes are pending to be applied? Couldn't find anything in the documentation, and the GET for "system/applyconfig" actually applies rather than returns info. Preferably using the API, but any solution that does not require checking the database directly is fine.

Thanks

Re: Checking Apply Config Status

Posted: Mon Apr 07, 2025 4:42 pm
by DoubleDoubleA
Hi @dxfuentes,

Thanks for your post.

There is not currently a way in the API to check if changes are pending. I don't have an elegant way to have you do that right at the moment, but if I did in the short term you could likely make a custom endpoint, which you can learn about in the developer docs in the API help.

Take a look at those custom API endpoint docs and tell me if that's anything that could work for you.

It's a good endpoint to have, I don't know that it will make the short list for an upcoming release though.

Aaron

Re: Checking Apply Config Status

Posted: Tue Apr 08, 2025 1:35 am
by kg2857
Not what you'd like but maybe diff the right page when the config can be applied and when it isn't needed. Then see if check_html can search for a string.

Re: Checking Apply Config Status

Posted: Tue Apr 08, 2025 9:03 am
by dxfuentes
DoubleDoubleA wrote: Mon Apr 07, 2025 4:42 pm Hi @dxfuentes,

Thanks for your post.

There is not currently a way in the API to check if changes are pending. I don't have an elegant way to have you do that right at the moment, but if I did in the short term you could likely make a custom endpoint, which you can learn about in the developer docs in the API help.

Take a look at those custom API endpoint docs and tell me if that's anything that could work for you.

It's a good endpoint to have, I don't know that it will make the short list for an upcoming release though.

Aaron
It could, but I assume Nagios determines changes are pending by writing a flag to its database which I am trying to avoid if possible. However, would you happen to know what table that would be or perhaps the query itself?

Re: Checking Apply Config Status

Posted: Tue Apr 08, 2025 11:25 am
by DoubleDoubleA
There is a flag that is set under many conditions, but conspicuously not when configs are added via the api. I've added an issue to address that but it's not something you can use today, and I can't promise when that will get completed.

There are a couple of other functions I am looking at that may work for a custom end point to call.

Re: Checking Apply Config Status

Posted: Wed Apr 09, 2025 12:30 pm
by DoubleDoubleA
@dxfuentes, there isn't a great way to do this via an XI function for a custom api endpoint given how the functions get called.