There are several Linux machines running Ubuntu on the network. Can PRTG ingest XML responses with the example format below? I have been reading about the Mini Probes but find it confusing. Also, on the Python Script Advanced Sensor page it says:

"The Python Script Advanced sensor executes a Python script on the computer running the local or remote probe. This option is provided as part of the PRTG Application Programming Interface (API). The return value of this sensor must be valid JSON or XML."

I found this on the Knowledge Base, https://helpdesk.paessler.com/en/support/solutions/articles/76000065198-how-can-i-monitor-linux-systems-with-a-prtg-mini-probe, but it appears that is will only return a set of standard sensors.

--------------------------------------------------------------------------------------------------------------
--- XML Format
--------------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="StatusOfHealth">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="Version" type="xs:string">
                </xs:element>
                <xs:element name="SequenceNumber" type="xs:unsignedInt" />
                <xs:element name="PreviousReportTime" type="xs:dateTime" />
                <xs:element name="CurrentReportTime" type="xs:dateTime" />
           </xs:sequence>
        </xs:complexType>
    </xs:element>
    <xs:simpleType name="HealthStatusType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="FullyOperational" />
            <xs:enumeration value="Degraded" />
            <xs:enumeration value="Failure" />
        </xs:restriction>
    </xs:simpleType>
</xs:schema>

Article Comments

Hi there,

You can use the HTTP XML/REST Sensor to monitor XML documents. Your example is an XML schema which will not work, XML documents however will be supported.

Best regards, Felix


Oct, 2015 - Permalink

Thanks for the reply. So if I understand from reading about the sensors there is only one value that can be reported in a sensor? So for example I could only report the health of my Linux machine with a sensor like the following:

<data> <section1> <name>Sensor Health</name> <value_string>FullyOperational</value_string> <function>l</function> <alarm1>0</alarm1> </section1> </data>

And if I wanted the same Linux machine to report the number of files it has received I have to create another sensor that would look something like the following: <data> <section2> <name>Sensor Health</name> <value_int>1234</value_int> <minimum>0</minimum> <maximum>9999</maximum> <function>l</function> <alarm1>0</alarm1> </section2> </data>

The two sets of information cannot be combined into one sensor, correct?


Oct, 2015 - Permalink

Hi,

You are right. You would need to add an additional sensor pointing to this XML files if you want to monitor two results using the HTTP XML/Rest sensor. Next to this, you can write your own EXE/Script Advanced Sensor. This way you can create multiple channels, one for each result, but this will require some scripting experience.

Best regards, Felix


Oct, 2015 - Permalink