Programmatically change contact group membership

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
kzabbott
Posts: 1
Joined: Mon Jun 28, 2021 1:26 pm

Programmatically change contact group membership

Post by kzabbott »

I am trying to determine if there is a way to programmatically change contact group membership.

Scenario: we have the contact group "Admin-OnCall", and we have contact objects for each of the five team members with their SMS numbers.
We would like to have a script that we can update during working hours that will run as a chron job or scheduled task at 11:59:59 PM every Thursday to change the membership of the "Admin-OnCall" group to the contact object of the person who will next be on call.

If at all possible, I'd prefer to be able to run whatever script from a remote windows server against our nagios installation, but I am open to other solutions as well, including something that would run as a scheduled command from within Nagios itself.

I look forward to any suggestions!
kg2857
Posts: 234
Joined: Wed Apr 12, 2023 5:48 pm

Re: Programmatically change contact group membership

Post by kg2857 »

You could probably use the API to do that from a script.
Post Reply