As it stands it's not possible to get sensor / device configuration information / details via API or to export a definition. We have a use case to do this so would appreciate if this capability could be added to the roadmap.
RFE - Add ability to export sensor / device definition as JSON or XML or either!
7 Replies
Hello,
Can you give us an example of wich information/definition you'd like to export via API exactly?
Yup for sure. Below I've included an example of what a Ping sensor definition might look like (sensor definition would change based on it's type) and a Device definition. Both examples have been built in XML.
NOTE: Where I've included "..." that means that I haven't fully built out that node and additional elements would go there. For time sake I didn't bother building out everything. Just wanted to provide samples.
SENSOR DEFINITION
<sensor> <ContainedDevice>Cluster Probe|Canada|Banking|MyBankApp|Production|MyBankServer</ContainedDevice> <BasicSensorSettings> <type>Ping</type> <name>Ping</name> <parentTags>MyTag1;MyTag2;MyTag3</parentTags> <tags>MyTag1;MyTag2;MyTag3</tags> <priority>3</priority> </BasicSensorSettings> <PingSettings> <timoutSec>5</timoutSec> <packetSizeBytes>32</packetSizeBytes> <pingMethod> <sendOneSinglePing>False</sendOneSinglePing> <sendMultiplePingRequests>True</sendMultiplePingRequests> </pingMethod> <pingCount>5</pingCount> <packetDelayMS>5</packetDelayMS> <acknowledgeAutomatically> <showDownStatusOnErrorDefault>True</showDownStatusOnErrorDefault> <showDownAcknowledgedStatusOnError>False</showDownAcknowledgedStatusOnError> </acknowledgeAutomatically> </PingSettings> <SensorDisplay> <primaryChannel>Ping Time (msec)</<primaryChannel> <graphType> <showChannelsIndependantly>True</showChannelsIndependantly> <stackChannelsOnTopOfEachOther>False</stackChannelsOnTopOfEachOther> </graphType> </SensorDisplay> <ScanningInterval> <inherited>True</inherited> <inheritedFrom>Cluster Probe|Canada|Banking|MyBankApp|Production</inheritedFrom> <scanningInterval>120 seconds</scanningInterval> <ifASensorQueryFails>Set sensor to warning for 1 interval, then set to down (recommended)</ifASensorQueryFails> </ScanningInterval> <SchedulesDepenedenciesMaintenanceWindows> <inherited>True</inherited> <inheritedFrom>Cluster Probe|Canada|Banking|MyBankApp|Production</inheritedFrom> <schedule>None</schedule> <maintenanceWindow> <doNotSetupAOneTimeMaintenanceWindow>False</doNotSetupAOneTimeMaintenanceWindow> <setupAOneTimeMaintenanceWindow> <status>True</status> <maintenanceBegins>2021-10-10 10:00</maintenanceBegins> <maintenanceEnds>2021-10-11 10:00</maintenanceEnds> <DependencyType> <useParent>False</useParent> <selectASensor> <status>True</status> <dependancy> <device>MyDevice</device> <sensor>MySensor</sensor> </dependancy> <dependencyDelay>0</dependencyDelay> </selectASensor> <masterSensorForParent>False</masterSensorForParent> </DependencyType> </setupAOneTimeMaintenanceWindow> </maintenanceWindow> </SchedulesDepenedenciesMaintenanceWindows> <AccessRights> <inherited>True</inherited> <inheritedFrom>Cluster Probe|Canada|Banking|MyBankApp|Production</inheritedFrom> <userGroupAccess> <Groups> <group> <userGroup>MyUserGroup1</userGroup> <rights>Inherited (Read Access)</rights> </group> <group> <userGroup>MyUserGroup2</userGroup> <rights>Inherited (No Access)</rights> </group> </Groups> </userGroupAccess> </AccessRights> </sensor>
DEVICE DEFINITION
<device> <ContainedDevice>Cluster Probe|Canada|Banking|MyBankApp|Production</ContainedDevice> <BasicDeviceSettings> <deviceName>MyBankServer</deviceName> <status> <started>True</started> <paused>False</paused> </status> <ipVersion> <IPv4> <status>True</staus> <AddressDNSName>127.0.0.1</AddressDNSName> </IPv4> <IPv6> <status>False</staus> <AddressDNSName>127.0.0.1</AddressDNSName> </IPv6> </ipVersion> <parentTags>MyTag1;MyTag2;MyTag3</parentTags> <tags>MyTag1;MyTag2;MyTag3</tags> <priority>3</priority> </BasicDeviceSettings> <AdditionalDeviceInformation> <DeviceIcon> <Icon1>True</Icon1> <Icon2>False</Icon2> ... </DeviceIcon> <serviceURL>http://127.0.0.1</serviceURL> </AdditionalDeviceInformation> <DeviceIdentificationAndAutoDiscovery> <autoDiscoveryLevel> <noAutoDicovery> <status>False</status> </noAutoDicovery> <standardAutoDisovery> <status>True</status> <schedule>Once</schedule> </standardAutoDisovery> <detailedAutoDisovery> <status>False</status> <schedule>Once</schedule> </detailedAutoDisovery> <autoDisocveryWithSpecificDeviceTemplates> <status>False</status> <schedule>Once</schedule> <deviceTemplates> <deviceTemplate> <name>ASDL</name> <seletced>True</selected> </deviceTemplate> <deviceTemplate> <name>AmazonCloudWatch</name> <seletced>False</selected> </deviceTemplate> <deviceTemplate> <name>BuffaloTeraStationNAS</name> <seletced>False</selected> </deviceTemplate> ... </deviceTemplates> </autoDisocveryWithSpecificDeviceTemplates> </autoDiscoveryLevel> </DeviceIdentificationAndAutoDiscovery> <Location> <inherited>True</inherited> <inheritedFrom>Cluster Probe|Canada|Banking|MyBankApp|Production</inheritedFrom> <locationForGeoMaps><locationForGeoMaps> </Location> <credentialsForWindowsSystems> <inherited>True</inherited> <inheritedFrom>Cluster Probe|Canada|Banking|MyBankApp|Production</inheritedFrom> <domainOrComputerName>MyDomain</domainOrComputerName> <userName>MyUser</userName> <Passowrd>********</Passowrd> </credentialsForWindowsSystems> <credentialsForLinuxSolarisMacOSSystems> <inherited>True</inherited> <inheritedFrom>Cluster Probe|Canada|Banking|MyBankApp|Production</inheritedFrom> ... </credentialsForLinuxSolarisMacOSSystems> <credentialsForVMWareXenServer> <inherited>True</inherited> <inheritedFrom>Cluster Probe|Canada|Banking|MyBankApp|Production</inheritedFrom> ... </credentialsForVMWareXenServer> <credentialsForSNMPDevices> <inherited>True</inherited> <inheritedFrom>Cluster Probe|Canada|Banking|MyBankApp|Production</inheritedFrom> ... </credentialsForSNMPDevices> <credentialsForDBMS> <inherited>True</inherited> <inheritedFrom>Cluster Probe|Canada|Banking|MyBankApp|Production</inheritedFrom> ... </credentialsForDBMS> <credentialsForAWS> <inherited>True</inherited> <inheritedFrom>Cluster Probe|Canada|Banking|MyBankApp|Production</inheritedFrom> ... </credentialsForAWS> <credentialsForDellEMC> <inherited>True</inherited> <inheritedFrom>Cluster Probe|Canada|Banking|MyBankApp|Production</inheritedFrom> ... </credentialsForDellEMC> <credentialsForHPE3PAR> <inherited>True</inherited> <inheritedFrom>Cluster Probe|Canada|Banking|MyBankApp|Production</inheritedFrom> ... </credentialsForMicrosoft365> <credentialsForHPE3PAR> <inherited>True</inherited> <inheritedFrom>Cluster Probe|Canada|Banking|MyBankApp|Production</inheritedFrom> ... </credentialsForMicrosoft365> <credentialsForMicrosoftAzure> <inherited>True</inherited> <inheritedFrom>Cluster Probe|Canada|Banking|MyBankApp|Production</inheritedFrom> ... </credentialsForMicrosoftAzure> <credentialsForMQTT> <inherited>True</inherited> <inheritedFrom>Cluster Probe|Canada|Banking|MyBankApp|Production</inheritedFrom> ... </credentialsForMQTT> <credentialsForOPCUA> <inherited>True</inherited> <inheritedFrom>Cluster Probe|Canada|Banking|MyBankApp|Production</inheritedFrom> ... </credentialsForOPCUA> <credentialsForSofficoOrchestra> <inherited>True</inherited> <inheritedFrom>Cluster Probe|Canada|Banking|MyBankApp|Production</inheritedFrom> ... </credentialsForSofficoOrchestra> <credentialsForRESTAPI> <inherited>True</inherited> <inheritedFrom>Cluster Probe|Canada|Banking|MyBankApp|Production</inheritedFrom> ... </credentialsForRESTAPI> <credentialsForVeeam> <inherited>True</inherited> <inheritedFrom>Cluster Probe|Canada|Banking|MyBankApp|Production</inheritedFrom> ... </credentialsForVeeam> <credentialsForVeeam> <inherited>True</inherited> <inheritedFrom>Cluster Probe|Canada|Banking|MyBankApp|Production</inheritedFrom> ... </credentialsForVeeam> <WindowsCompatabilityOptions> <inherited>True</inherited> <inheritedFrom>Cluster Probe|Canada|Banking|MyBankApp|Production</inheritedFrom> <preferredDataSource> <performanceCountersAndWMIAsFallback>False</performanceCountersAndWMIAsFallback> <performanceCountersOnly>False</performanceCountersOnly> <WMIOnly>True</WMIOnly> </preferredDataSource> <timeoutMethod> <use15XScanningInterval>False</use15XScanningInterval> <setManually> <status>True</status> <timeoutSec>60</timeoutSec> </setManually> </timeoutMethod> </WindowsCompatabilityOptions> <SNMPCompatibilityOptions> ... </SNMPCompatibilityOptions> <ProxySettingsForHTTPSensors> <AddressDNSName>127.0.0.1</AddressDNSName> <port>8080</port> <userName>MyUser</userName> <password>MyPassword</password> </ProxySettingsForHTTPSensors> <ScanningInterval> <inherited>True</inherited> <inheritedFrom>Cluster Probe|Canada|Banking|MyBankApp|Production</inheritedFrom> <scanningInterval>120 seconds</scanningInterval> <ifASensorQueryFails>Set sensor to warning for 1 interval, then set to down (recommended)</ifASensorQueryFails> </ScanningInterval> <SchedulesDepenedenciesMaintenanceWindows> <inherited>True</inherited> <inheritedFrom>Cluster Probe|Canada|Banking|MyBankApp|Production</inheritedFrom> <schedule>None</schedule> <maintenanceWindow> <doNotSetupAOneTimeMaintenanceWindow>False</doNotSetupAOneTimeMaintenanceWindow> <setupAOneTimeMaintenanceWindow> <status>True</status> <maintenanceBegins>2021-10-10 10:00</maintenanceBegins> <maintenanceEnds>2021-10-11 10:00</maintenanceEnds> <DependencyType> <useParent>False</useParent> <selectASensor> <status>True</status> <dependancy> <device>MyDevice</device> <sensor>MySensor</sensor> </dependancy> <dependencyDelay>0</dependencyDelay> </selectASensor> <masterSensorForParent>False</masterSensorForParent> </DependencyType> </setupAOneTimeMaintenanceWindow> </maintenanceWindow> </SchedulesDepenedenciesMaintenanceWindows> <AccessRights> <inherited>True</inherited> <inheritedFrom>Cluster Probe|Canada|Banking|MyBankApp|Production</inheritedFrom> <userGroupAccess> <Groups> <group> <userGroup>MyUserGroup1</userGroup> <rights>Inherited (Read Access)</rights> </group> <group> <userGroup>MyUserGroup2</userGroup> <rights>Inherited (No Access)</rights> </group> </Groups> </userGroupAccess> </AccessRights> <ChannelUnitConfigurration> ... </ChannelUnitConfigurration> <AdvancedNetworkAnalysis> <unusualDetection> <status>Enable</status> </unusualDetection> <similarSensorDetection> <status>Enable</status> </similarSensorDetection> <systemInformationDetection> <status>Enable</status> </systemInformationDetection> </AdvancedNetworkAnalysis> </device>
Created on Jul 28, 2021 3:17:35 PM by
kyle_moyer
(3)
●1
Last change on Jul 28, 2021 7:07:43 PM by
Felix Wiesneth [Paessler Support]
Hello,
I'm afraid it's not possible to export a XML like this automatically. You could however use the "/api/getobjectproperty.htm" API command to export specific properties such as device and sensor settings. Also have a look here.
Alternatively you can try using the Powershell PrtgAPI from the third party supplier lordmilko. Also have a look here
Thanks for the information and that may prove to be somewhat useful.
Note while I know it's not possible today my post was a Request For Enhancement (an RFE). I'd appreciate if this capability could be added to the PRTG road map for delivery in a future version.
Sorry, I missed the "RFE" in the title. Would you mind submitting an official feature request as explained here ? If there's a KB post with the correct format and tags, this will allow other users to vote for it (used for prioritizing) and we can keep better track on all requests. Thanks!
Sure thing, and thank you! I wasn't sure how to submit a formal feature request so I took my best shot.
Thank you! Here's the published feature request: https://kb.paessler.com/en/topic/89805
Please log in or register to enter your reply.
Add comment