Hello all,
I have a host's service .cfg file that has 656 services in it and a specific user is asssigned to 462 of those services.
I want to remove that user against all of the services on that host.
cd /usr/local/nagios/etc/services
[root@nagios-b services]# grep userID SERVICE_FILEcfg | wc -l
462
[root@nagios-b services]# grep description SERVICE_FILE.cfg | wc -l
656
I tried the Bulk Modfication Tool | Remove Contact from Hosts/Services, but once I find relationships for the user, I have to click on each individual service versus having a list that we can filter, select all, and add to the list.
I tried grepping the user out of the SERVICE_FILE.cfg and output it to ../import/SERVICE_FILE.cfg. Then when I try an import of the ../import/SERVICE_FILE.cfg, I have two services conigurations... SERVICE_FILE.cfg and SERVICE_FILE.cfg.cfg.
While I was typing this, I did BMT and add contact. I select all of the services for that SERVICE_FILE.cfg (all 656) and now see the user configured against every service in the SERVICE_FILE.cfg.
[root@nagios-b services]# grep userID SERVICE_FILE.cfg |wc -l
656
When I go to BMT and try to remove the user against the HOST, that doesn't touch the user being assigned to the SERVICES.
I'm running XI v5.6.5
Help, please!
Regards,
JL
Remove a user as a contact from services
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Remove a user as a contact from services
Hi JL,
Looking this over, I was wondering if you used templates at all to assign contacts to hosts/services or groups? If that's the case, we can remove/edit the template to make the changes rather than selecting from the list of services in the BMT.
If you're not sure, you can send me your system profile and I can take a look at the configurations.
To send us your system profile.
Login to the Nagios XI GUI using a web browser
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Save the profile.zip file and share this in a private message and then reply to this post to bring it up in the queue.
Looking this over, I was wondering if you used templates at all to assign contacts to hosts/services or groups? If that's the case, we can remove/edit the template to make the changes rather than selecting from the list of services in the BMT.
If you're not sure, you can send me your system profile and I can take a look at the configurations.
To send us your system profile.
Login to the Nagios XI GUI using a web browser
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Save the profile.zip file and share this in a private message and then reply to this post to bring it up in the queue.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Remove a user as a contact from services
We do use a template to build these services. And I may have been part of that template at one time. But I'll DM you the system profile.
Thanks a lot.
Thanks a lot.
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Remove a user as a contact from services
Hello,
Thanks for sending the profile. What is the name of the contact your are trying to remove and a few of the sample services.
As far as I can tell most the services are using the wizard templates, but you have contact groups assigned to the services.
Would it be possible use assign a new contactgroup to those services without the contact. Again organizing everything using groups will help make this easier.
Thanks for sending the profile. What is the name of the contact your are trying to remove and a few of the sample services.
As far as I can tell most the services are using the wizard templates, but you have contact groups assigned to the services.
Would it be possible use assign a new contactgroup to those services without the contact. Again organizing everything using groups will help make this easier.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Remove a user as a contact from services
Hey there. Thanks for the quick response.
I want to remove my user ID (luczynj) from any service that starts with NOAS, NGCC, and GSIP. I may have added my account using the template, but I don't recall.
Do you work for Nagios? This issue has had me come up with a couple suggestions.
One would be to be with the BMT to be able to remove a contact the same way we add them. With the drop-down box, select hosts/services, click add to move them to the right column, etc...
Another suggestion I would *LOVE* to see is customizing notifications based on Service or Host Groups.
IE, I would like to get CRITICAL email notifications for any hosts or services that are in the GMV-OSS-RC host/service groups, but no email alerts for NOAS. Etc. Let me know if that's clear enough, or if there's another way to submit product ideas. Since we've been digging into Nagios, my colleague and I have several suggestions.
Thanks for the support.
Regards,
JL
I want to remove my user ID (luczynj) from any service that starts with NOAS, NGCC, and GSIP. I may have added my account using the template, but I don't recall.
Do you work for Nagios? This issue has had me come up with a couple suggestions.
One would be to be with the BMT to be able to remove a contact the same way we add them. With the drop-down box, select hosts/services, click add to move them to the right column, etc...
Another suggestion I would *LOVE* to see is customizing notifications based on Service or Host Groups.
IE, I would like to get CRITICAL email notifications for any hosts or services that are in the GMV-OSS-RC host/service groups, but no email alerts for NOAS. Etc. Let me know if that's clear enough, or if there's another way to submit product ideas. Since we've been digging into Nagios, my colleague and I have several suggestions.
Thanks for the support.
Regards,
JL
Re: Remove a user as a contact from services
Sorry to have missed the last part of your email:
Would it be possible use assign a new contactgroup to those services without the contact. Again organizing everything using groups will help make this easier.
I only need my user ID removed from them. We have the correct contact groups set up. We're about to clone this system to new a new hardware/server. I'm just cleaning up the last stuff.
Thanks again.
Would it be possible use assign a new contactgroup to those services without the contact. Again organizing everything using groups will help make this easier.
I only need my user ID removed from them. We have the correct contact groups set up. We're about to clone this system to new a new hardware/server. I'm just cleaning up the last stuff.
Thanks again.
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Remove a user as a contact from services
Hello,
Yes, I do and I can certainly get feature requests filed on your behalf with the development team here. Right now, there isn't a direct approach in the GUI for these changes and the configuration files are not meant to be directly edit. The best workaround I can think of would be to create new service groups as you can filter the search on hosts starting with NOAS, NGCC and GSIP, then use BMT to assign the contactgroup (with out luczyn) to the new hostgroup.One would be to be with the BMT to be able to remove a contact the same way we add them. With the drop-down box, select hosts/services, click add to move them to the right column, etc...
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Remove a user as a contact from services
Hi Ben,
I get what you're saying about how I should do it, but I was more interested in how I could undo what I had already done without revamping our current layout.
"Feature Request #1:
To remove user in BMT from being a contact for services of a host as well as removing user as a contact for the host. When using the BMT, if a contact has been removed from a host/hostgroup, but is assigned as a contact to services on that host, have the BMT check for that and prompt us with, "This user is a contact for XXX services on this host and/or a contact in a servicegroups/hostgroup on this host. Would you like to remove the contact from those groups as well?"
Feature Request #2:
How I tried to fix it originally was to grep out the userID from the /usr/local/nagios/etc/services/service-host-file.cfg and send the output to ../transfer or ../import. Then do a config file import of that file, and have the import notice that the contact has been omitted from the service-host-cofnig.cfg file, and it will remove the contact since they are not listed in the the ../import/ ../transferfile. I think this may actually be a bug. When you check the "update database" or "overwrite database", it should do just that. But it's not. It's skipping over the contact part and any user that was in the service confg file as a contact, remains in the database as a contact.
Feature Request #3: When I click on the REPORTS tab, it automatically starts to run the avail.cgi report? I'm not sure which one, but due to the high volume of services we have,we should have the option to NOT automatically run a report when we go to the menus tab. It's been 8 minutes since I clicked on the REPORTS menu and the CGI script is still running, and I can't cancel out of it.
Feature Request #4: When adding a Solaris server that uses SMF, it should run the svcs command and bring up a list of *ALL* services, as well as the embedded details about those services. IE, if you do a svcs - x.
For example:
root@tpossmas:~# svcs -x /network/http
svc:/network/http:apache2 (Apache 2 HTTP server)
State: online since Fri Mar 27 03:10:01 2020
See: httpd(8)
See: /var/svc/log/network-http:apache2.log
Impact: None.
Thanks again for your help. After showing my colleague my issue, we decided that my best option is to remove the user from all services and hosts, and just add them at the service groups or host level.
Thanks for everything.
Regards,
JLu
I get what you're saying about how I should do it, but I was more interested in how I could undo what I had already done without revamping our current layout.
"Feature Request #1:
To remove user in BMT from being a contact for services of a host as well as removing user as a contact for the host. When using the BMT, if a contact has been removed from a host/hostgroup, but is assigned as a contact to services on that host, have the BMT check for that and prompt us with, "This user is a contact for XXX services on this host and/or a contact in a servicegroups/hostgroup on this host. Would you like to remove the contact from those groups as well?"
Feature Request #2:
How I tried to fix it originally was to grep out the userID from the /usr/local/nagios/etc/services/service-host-file.cfg and send the output to ../transfer or ../import. Then do a config file import of that file, and have the import notice that the contact has been omitted from the service-host-cofnig.cfg file, and it will remove the contact since they are not listed in the the ../import/ ../transferfile. I think this may actually be a bug. When you check the "update database" or "overwrite database", it should do just that. But it's not. It's skipping over the contact part and any user that was in the service confg file as a contact, remains in the database as a contact.
Feature Request #3: When I click on the REPORTS tab, it automatically starts to run the avail.cgi report? I'm not sure which one, but due to the high volume of services we have,we should have the option to NOT automatically run a report when we go to the menus tab. It's been 8 minutes since I clicked on the REPORTS menu and the CGI script is still running, and I can't cancel out of it.
Feature Request #4: When adding a Solaris server that uses SMF, it should run the svcs command and bring up a list of *ALL* services, as well as the embedded details about those services. IE, if you do a svcs - x.
For example:
root@tpossmas:~# svcs -x /network/http
svc:/network/http:apache2 (Apache 2 HTTP server)
State: online since Fri Mar 27 03:10:01 2020
See: httpd(8)
See: /var/svc/log/network-http:apache2.log
Impact: None.
Thanks again for your help. After showing my colleague my issue, we decided that my best option is to remove the user from all services and hosts, and just add them at the service groups or host level.
Thanks for everything.
Regards,
JLu
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Remove a user as a contact from services
Hi Jlu,
Appreciate all the detailed feedback on XI. Regarding, feature request 3, there is an option on the performance settings to disable auto-running of reports. Go to Admin > Performance Settings > Auto-Running > Disable reports
Let me know if you have any any questions or comments.
Appreciate all the detailed feedback on XI. Regarding, feature request 3, there is an option on the performance settings to disable auto-running of reports. Go to Admin > Performance Settings > Auto-Running > Disable reports
Let me know if you have any any questions or comments.
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Remove a user as a contact from services
Thanks for the info about the reports.
I couldn't figure out a way to remove my user account from the 400+ services on a host. I tried grepping out my userID and sending the output to ../service-name.cfg. Then I tried importing that service-name.cfg, including "overwrite database", but that didn't work either. So I removed myself from *ALL* services and hosts and then added myself back as a contact group.
You can close this thread. Thanks again for your support.
Regards,
JL
I couldn't figure out a way to remove my user account from the 400+ services on a host. I tried grepping out my userID and sending the output to ../service-name.cfg. Then I tried importing that service-name.cfg, including "overwrite database", but that didn't work either. So I removed myself from *ALL* services and hosts and then added myself back as a contact group.
You can close this thread. Thanks again for your support.
Regards,
JL