Closed karthikkonar24 closed 3 years ago
Hi @karthikkonar24,
Are you able to advise what the output of
Get-Probe -Id XXXX | Get-Trigger -Type state -Inherited $false
Get-Probe -Id XXXX | Get-Trigger -Type state -Inherited $false | Clone-Object -DestinationId XXXX -Verbose
Get-PrtgClient -Diagnostic
is?
Please obscure any sensitive details in the output from the second command such as your PRTG Server URL, username and passhash
Regards, lordmilko
Hey lordmilko, Please find the below response for your reference:
Hi @karthikkonar24,
Based on the response to the first request, we can see that there are no non-inherited state triggers defined on the probe with ID 8334, hence why Clone-Object
does nothing - there is nothing to clone!
If you have a look at the triggers defined on the probe with ID 8334 in the PRTG UI, are you able to advise whether any non-inherited state triggers display there?
Regards, lordmilko
Hey lordmilko,
Device ID 8334 containing the notification trigger which I want to clone the same to the device id 9362. Please find the GUI view of the notification trigger which available on the ID 8334.
Hi @karthikkonar24,
Are you able to advise what the output of
Get-Probe -Id 8334
is?
Hi @lordmilko,
It's not returning any value after entering the command.
But the 8334 is a device id, if do Get-device -id 8334 will return the value of device details.
Hi @karthikkonar24,
This appears to be a duplicate of #219
Can you please try and run the latest build of PrtgAPI via the manual installation instructions and advise whether Get-Probe -Id 8334
returns anything using that, and if so whether you can also retrieve and clone your triggers properly?
Regards, lordmilko
Hi lordmilko,
As per your suggestions, I've downloaded the latest PRTGAPI but still Get-Probe -Id 8334 not returning any value. Any suggestion on it.
Regards, Karthik Yadav
Hi @karthikkonar24,
Can you do
Set-PrtgClient -LogLevel All
Get-Probe -Verbose
Get-Probe -Id 8334 -Verbose
and provide the output (please obscure any sensitive details like your server name, username and passhash int he results)
Hi @karthikkonar24,
Just following up on this. Another user also appeared to have this issue and it turned out they weren't in fact using the new build of PrtgAPI
To make sure you are using the new version of PrtgAPI, can you
C:\temp\PrtgAPI
ipmo C:\temp\PrtgAPI
Get-Probe -Verbose
Get-Probe -Id 8334 -Verbose
(gmo prtgapi).path
Regards, lordmilko
Hi @lordmilko, Please find the output.
PS C:\Users\ABC> Set-PrtgClient -LogLevel All
PS C:\Users\ABC> Get-Probe -Verbose
VERBOSE: Get-Probe: Synchronously executing request
http://XXX-XXXX.COM/api/table.xml?content=probenode&columns=objid,name,condition,fold,groupnum,devicenum,up
sens,downsens,downacksens,partialdownsens,warnsens,pausedsens,unusualsens,undefinedsens,totalsens,schedule,basetype,bas
elink,notifiesx,intervalx,access,dependency,position,status,comments,priority,message,parentid,tags,type,active&count=*
&filter_parentid=0&username=XXX&passhash=XXXXXX
VERBOSE: Get-Probe:
PS C:\Users\ABC>
PS C:\Users\ABC> Get-Probe -Id 8334 -Verbose
VERBOSE: Get-Probe: Synchronously executing request
http://XXX-XXXX.COM/api/table.xml?content=probenode&columns=objid,name,condition,fold,groupnum,devicenum,up
sens,downsens,downacksens,partialdownsens,warnsens,pausedsens,unusualsens,undefinedsens,totalsens,schedule,basetype,bas
elink,notifiesx,intervalx,access,dependency,position,status,comments,priority,message,parentid,tags,type,active&count=*
&filter_objid=8334&filter_parentid=0&username=XXXX&passhash=XXXXXXXX
VERBOSE: Get-Probe:
Thanks @karthikkonar24,
Can you copy and paste the URL of the first request, i.e. this one
http://XXX-XXXX.COM/api/table.xml?content=probenode&columns=objid,name,condition,fold,groupnum,devicenum,up
sens,downsens,downacksens,partialdownsens,warnsens,pausedsens,unusualsens,undefinedsens,totalsens,schedule,basetype,bas
elink,notifiesx,intervalx,access,dependency,position,status,comments,priority,message,parentid,tags,type,active&count=*
&filter_parentid=0&username=XXX&passhash=XXXXXX
into the address bar of your web browser, hit enter, and then provide the contents of the table.xml
file it downloads?
Hi @karthikkonar24,
I installed the same version of PRTG you're using (20.3.61.1649) and have managed to reproduce the issue. This issue is happening due to a bug that was present in this PRTG version that I actually opened a case with Paessler regarding around this time last year.
If you upgrade PRTG to version v20.3.62.1397 or higher you should find that Get-Probe
is now functioning properly
Hi @karthikkonar24,
Please be advised I have now released PrtgAPI 0.9.16, which includes
GetProbe
also works on PRTG 20.3.60 and 20.3.61 (which contain a bug in how the type_raw
XML field is formatted)To update PrtgAPI please run Update-Module PrtgAPI
and reopen PowerShell. I also noted that in this screenshot you were trying to retrieve the probe with ID 8334, however according to this screenshot the object with ID 8334 is actually a device (you can see it says device.htm in the URL) so I would say potentially for cloning these triggers you may really need to be doing Get-Device -Id 8334
Please let me know if you have any further issues
Regards, lordmilko
I've tried to clone the notification trigger from one device to another. Using the below command.
Get-Probe -Id XXXX | Get-Trigger -Type state -Inherited $false | Clone-Object -DestinationId XXXX
It's not throwing any error in Powershell. But cloning notification trigger is not happening.
Correct Me!!! If I'm wrong.