What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

HTTP API or PRTGAPI (PowerShell)

Votes:

0

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://kb.paessler.com/en/topic/2733-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:

  1. SNMP Uptime $Parameters = Get-Device -Probe $Probe -Host $HostName | New-SensorParameters -RawType snmpuptime Get-Device -Probe $Probe -Host $HostName | Add-Sensor -Parameters $Parameters
  1. SNMP Disk $Parameters = Get-Device -Probe $Probe -Host $HostName | New-SensorParameters -RawType snmpdiskfree Get-Device -Probe $Probe -Host $HostName | Add-Sensor -Parameters $Parameters

http-api powershell snmp

Created on Jun 20, 2019 8:11:07 AM



6 Replies

Votes:

0

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.

Created on Jun 20, 2019 12:27:30 PM by  Torsten Lindner [Paessler Support]



Votes:

0

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?

Created on Jun 20, 2019 1:06:36 PM



Votes:

0

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.

Created on Jun 20, 2019 1:13:50 PM by  Torsten Lindner [Paessler Support]



Votes:

0

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

Created on Jun 20, 2019 2:12:09 PM



Votes:

0

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

Created on Jun 24, 2019 7:53:29 AM by  Torsten Lindner [Paessler Support]



Votes:

0

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.

Created on Jul 4, 2019 1:03:21 PM




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.