Web Inject config files not removing

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
krobertson71
Posts: 444
Joined: Tue Feb 11, 2014 10:16 pm

Web Inject config files not removing

Post by krobertson71 »

I have been testing with web inject. Once I was done I removed the web inject service from CCM > Applied Configuration.

I removed the host google.com and applied configuration.

I had two of these where I was trying different things, but were removed with the same steps above.

When I go into /usr/local/nagiosxi/etc/components/webinject the files are still there even though they are no longer showing in CCM or under Hosts or Services from the Home screen.

Code: Select all

-rw-r--r-- 1 apache nagios   224 Nov 23 12:49 google_com__Web_Transaction_config.xml
-rw-r--r-- 1 apache nagios    94 Nov 23 12:49 google_com__Web_Transaction_testdata.xml
-rwxrwxr-x 1 apache nagios 63271 Jun 10 16:52 webinject.pl
-rw-r--r-- 1 apache nagios   228 Nov 23 12:38 www_google_com__Web_Transaction_config.xml
-rw-r--r-- 1 apache nagios   196 Nov 23 12:38 www_google_com__Web_Transaction_testdata.xml
I am sudoed to the nagios user but it does not have permission to remove the files.

Bigger question is why these are not being removed when I remove them via CCM??
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Web Inject config files not removing

Post by tmcdonald »

What version of XI are you using?
Former Nagios employee
krobertson71
Posts: 444
Joined: Tue Feb 11, 2014 10:16 pm

Re: Web Inject config files not removing

Post by krobertson71 »

From earlier post I had a time of getting to 2.0. That is where I am now.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Web Inject config files not removing

Post by tmcdonald »

I'm seeing this same behavior. I don't believe the CCM ever did this to begin with. Would you like me to put in a feature request for this? You should still be able to remove them as the root user.
Former Nagios employee
krobertson71
Posts: 444
Joined: Tue Feb 11, 2014 10:16 pm

Re: Web Inject config files not removing

Post by krobertson71 »

tmcdonald wrote:I'm seeing this same behavior. I don't believe the CCM ever did this to begin with. Would you like me to put in a feature request for this? You should still be able to remove them as the root user.
Im in a bigger environment and do not have root access to these servers... Just sudo to nagios. The files are owned by APACHE NAGIOS.

You would think the Nagios user could remove them.


And yes. I think when you remove the service it should remove the config as part of that process. We are planning to do many of these.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Web Inject config files not removing

Post by tmcdonald »

Feature request has been filed. ID 4538.

As for removal, what are the permissions on the webinject files in your environment?
Former Nagios employee
krobertson71
Posts: 444
Joined: Tue Feb 11, 2014 10:16 pm

Re: Web Inject config files not removing

Post by krobertson71 »

They are in the first post. Here they are again.. Let me know if you are looking for something different. Cleaning them up would be just giving the nagios user permissions to that directory to allow deletion. What I think should be done is that they are removed when the service is removed and configuration applied, but you have submitted that already and I thank you for it.

Code: Select all

-rw-r--r-- 1 apache nagios   224 Nov 23 12:49 google_com__Web_Transaction_config.xml
-rw-r--r-- 1 apache nagios    94 Nov 23 12:49 google_com__Web_Transaction_testdata.xml
-rwxrwxr-x 1 apache nagios 63271 Jun 10 16:52 webinject.pl
-rw-r--r-- 1 apache nagios   228 Nov 23 12:38 www_google_com__Web_Transaction_config.xml
-rw-r--r-- 1 apache nagios   196 Nov 23 12:38 www_google_com__Web_Transaction_testdata.xml
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Web Inject config files not removing

Post by tmcdonald »

Sorry, I meant to ask for the folder* not the files.

But yea, I can imagine how it might be done on the backend. The tricky part is having the Core Config Manager know what counts as a Webinject service. The Webinject files are named similarly to the services so it might be possible to just go through and do a comparison. If it can't be done as part of the Apply Config, would it work as a component or a cron job that does it on a schedule?
Former Nagios employee
krobertson71
Posts: 444
Joined: Tue Feb 11, 2014 10:16 pm

Re: Web Inject config files not removing

Post by krobertson71 »

Here are the folder permissions:
You do not have the required permissions to view the files attached to this post.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Web Inject config files not removing

Post by tmcdonald »

That's matching up with my system, and I am able to su to nagios and delete them with no problem. Do you have an ACL or SELinux enabled that might be blocking the deletion?
Former Nagios employee
Locked