Is it possible to script changes to the membership list of a user group? We have an on call user group that is used for over night notification delivery. The membership of this group changes every week. We have an ever growing script that keeps track of the oncall calendar and automatically changes the notification settings for our other monitoring products (nagios, Exchange, SAN manager, SMS, various other programs etc). PRTG is currently the only product we have that we need to remember to manually change the group membership every week. I see the editusergroup.htm code uses a POST method when changing data. Is it possible to use curl or something similar to send POST data to PRTG to change group membership so this is in line with our other monitoring programs?
If it's not possible to change the user group membership, it is possible to change the email address list for notifications?
Either method would work for us and we're not afraid of getting dirty in the code dungeon.
Article Comments
The way we have solved this is by having PRTG (and other applications) send the notifications to a mailbox that is constantly checked by another app. This app "knows" who is on call and forwards the notification by email and/or sends it through sms.
Apr, 2011 - Permalink
We used to do something similar by using an Exchange "group" and changing the membership to the pager email of who ever was on call. However we found that delivering through our exchange server created too many uncertainties and delayed deliveries. Even worse of part of what we need notification for caused problems with the exchange server. We are now setting all notification mechanisms to send alerts and escalations directly to our SMS numbers.
With everything we have generating notifications we are able to edit a text file or access an API to have a remote cron job check the calendar and change the configs as appropriate. PRTG is the only system which requires manual intervention. I suppose it's time to learn me some Powershell. Then we could trigger a script which looks up who's oncall and generates a notification but that creates another failure point which is what we're trying to eliminate.
For now we'll stick with interns making the weekly changes. However API access to users and groups is something we could make very good use of and would like to add as a feature request. Especially a feature that let us run security/permission audit on users and groups.
Apr, 2011 - Permalink
we did discuss this internal and managing users and groups through the API is nothing the API was planed for.
Apr, 2011 - Permalink