New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


Referencing Group in API Call

Votes:

0

Your Vote:

Up

Down

Hello,

I'm trying to use API call to enable/disable all monitors for all devices in a particular group. I see in the documentation there is a way to reference the group, but no examples. Does anyone have a sample API call to disable devices by group?

Thanks in advance

api disable enable group

Created on Mar 25, 2019 6:06:48 PM by  cojoe (0) 1



1 Reply

Accepted Answer

Votes:

1

Your Vote:

Up

Down

You could simply use the pause API call with the ID of the group to pause the entire group:

pause /api/pause.htm?id=objectid&pausemsg=yourmessage&action=0

resume /api/pause.htm?id=objectid&action=1

The first one will pause it indefinitely, the other resumes it :) Replace objectid accordingly. PRTGapi (see signature) is even easier:

# get devies of a group and pause them indefinitely
Get-Device -Group (Get-Group -Id <groupid>) | Pause-Object -Forever
# resume the devices within that group 
Get-Device -Group (Get-Group -Id <groupid>) | Resume-Object

PRTGapi | Feature Requests | WMI Issues | SNMP Issues

Kind regards,
Stephan Linke, Tech Support Team

Created on Mar 25, 2019 9:03:07 PM by  Stephan Linke [Paessler Support]

Last change on Mar 26, 2019 2:41:18 PM by  Stephan Linke [Paessler Support]



Please log in or register to enter your reply.


Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.