PRTG Scripts and custom functions for the PrtgAPI
Adds the SNMP traffic sensors to a specific device.
Add-SNMPTrafficSensor
[[-device] <PrtgAPI.Device[]>]
[[-propertiesfilter]<string[]>]
[[-valuefilter]<string[]>]
[[-logfile]<string[]>]
[<CommonParameters>]
-propertiesfilter
The properties contain: Internal name, Name, Status, speed as an array and will filter based on the string provided.
-valuefilter
The value contains the name and will filter based on the string provided. If you don't wanna filter put a wildcard. Also use Wildcards with the search string if you just wanna filter on some characters.
Add-SNMPTrafficSensor $device "Connected" "*Uplink*" $logfile
Add all interfaces which are connected and the description of the port contains "Uplink" and specify an own logfile path.
- make settings customizable
- Synopsis
- Comment code
It uses the session created from get-prtgclient
.
Use Connect-PrtgServer
to connect to your server
Add-SNMPTrafficSensor
[[-name] <string[]>]
[[-defaulthome]<string[]>]
[[-string]<string[]>]
[[-isadmingroup]<int[]>]
[[-isadgroup]<int[]>]
[[-adgroup]<int[]>]
[[-usertype]<int[]>]
[[-userack]<int[]>]
[[-allowedsensorsmode]<int[]>]
[[-ticketmode]<int[]>]
[<CommonParameters>]
-name
PRTG User Group Name
-isadmingroup
Administrative Rights
0 - Do not give user group members administrative rights (default)
1 - Give user group members administrative rights
defaulthome
PRTGHome Page URL
-isadgroup
Active Directory or Single Sign-On Integration
0 - Do not use Active Directory or single sign-on integration (default)
1 - Use Active Directory integration
2 - Use single sign-on integration (not supported)
-ssogroupaccessclaim (not supported)
Haven't been able to checkout SSO. So currently not supported. You could edit the function directly.
-adgroup
Active Directory Group Name
-usertype
User Type
0 - Read/write user (default)
1 - Read-only user
-userack
Acknowledge Alarms
0 - User cannot acknowledge alarms (default)
1 - User can acknowledge alarms
-allowedsensorsmode
Allowed Sensors
0 - Users can create all sensors (default)
1 - Users can only create certain sensors
Currently not supported to choose which sensors
-ticketmode
0 - Users cannot use the ticket system (default)
1 - Users can use the ticket system
To create a new group with AD integration and Read-only
Example
New-PrtgUsergroup -name Test123 -isadgroup 1 -adgroup YOURADGROUP -usertype 1