I'm trying to setup a large PRTG installation, but I have problems automating it. The following article specifies that I should use SNMP if possible. ( https://helpdesk.paessler.com/en/support/solutions/articles/76000041624-how-can-i-speed-up-prtgespecially-for-large-installations )
How do I add SNMP Service using HTTP API or PRTGAPI (lordmilko)?
This is how I do SNMP Uptime and SNMP Disk:
- SNMP Uptime $Parameters = Get-Device -Probe $Probe -Host $HostName | New-SensorParameters -RawType snmpuptime Get-Device -Probe $Probe -Host $HostName | Add-Sensor -Parameters $Parameters
- SNMP Disk $Parameters = Get-Device -Probe $Probe -Host $HostName | New-SensorParameters -RawType snmpdiskfree Get-Device -Probe $Probe -Host $HostName | Add-Sensor -Parameters $Parameters
Article Comments
I want to: SNMP Service Print Spooler on Print servers SNMP Service DHCP Server on DHCP servers SNMP Service SQL Database on SQL servers
This script adds monitoring of the Power Service (service nr 1) SNMP Service $Parameters = Get-Device -Probe $Probe -Host $HostName | New-SensorParameters -RawType snmpservice Get-Device -Probe $Probe -Host $HostName | Add-Sensor -Parameters $Parameters
I need to specify the service when I run the New-SensorParameters function. How do I do this?
Jun, 2019 - Permalink
This "script" does not add/install SNMP Services on Windows machines. It may add according SNMP Sensors in PRTG, but it won't change anything on the actual Windows machines to beginn with.
Jun, 2019 - Permalink
I have a script for installing the SNMP Windows Feature.
What I need is a API call / Powershell command (PRTGAPI (lordmilko)) to add the sensor SNMP Service "ServiceName" to the device inside PRTG
Jun, 2019 - Permalink
Andreas, alright, understood. There is no native API Call for this in PRTG to add a SNMP Service Senssor for service xyz on a Target. You could clone such existing sensors though to a new device. For cloning there is the API Call:
/api/duplicateobject.htm?id=id_of_sensor_to_clone&name=new_name&targetid=id_of_target_device
Jun, 2019 - Permalink
This is not good enough. But I found a way with the PrtgAPI by lordmilko. I've added this to GitHub
GitHub link: https://github.com/pcmannen/prtg
Code creates all basic SNMP Sensors.
PS: This wouldn't be possible without lordmilko. Paessler should either hire the guy/girl or pay him/her for this great work.
Jul, 2019 - Permalink
Hello,
Thank you for the KB-Post. May I ask, do you want to add the SNMP Service onto various Windows based target machines with these commands?
best regards.
Jun, 2019 - Permalink