New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

300.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


HTTP API or PRTGAPI (PowerShell)

Votes:

0

Your Vote:

Up

Down

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 by  Andreas (0) 1



6 Replies

Votes:

0

Your Vote:

Up

Down

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

Your Vote:

Up

Down

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 by  Andreas (0) 1



Votes:

0

Your Vote:

Up

Down

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

Your Vote:

Up

Down

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 by  Andreas (0) 1



Votes:

0

Your Vote:

Up

Down

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

Your Vote:

Up

Down

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 by  Andreas (0) 1



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.