Use Wheatermap as IFRAME in PRTG Monitoring Maps

Hi,

We used wheatermap long time together with nagios and cacti but we changed last year our Monitoring to PRTG from Paessler. So far a simple and easy Interface and also with great maps. But there is no Chance to get a Network wheater map from them… But they provide an API Interface so this is how i get here to the Forum.

my idea is to use the data from the api who can return an XML or a json to use as data inside the Network wheater map… any idea if this case will be simple?

the json Looks like this:
{
“prtgversion”: “17.4.33.3283+”,
“sensordata”: {
“name”: “ifc22 (Slot: 1 Port: 22) - 100 MBit/s”,
“sensortype”: “snmptraffic 64bit”,
“interval”: “60”,
“probename”: “ZWL-PRTG-PRB1”,
“parentgroupname”: “Testing”,
“parentdevicename”: “Iost_001_5520 (192.168.152.153) [RMON]”,
“parentdeviceid”: “30704”,
“lastvalue”: “-”,
“lastmessage”: “Pausiert durch überg. Objekt”,
“favorite”: “false”,
“statustext”: “Pausiert (Pausiert durch überg. Objekt)”,
“statusid”: “7”,
“lastup”: “43122.6167475347 [liegt 47 Std. 7 Min. zurück]”,
“lastdown”: “-”,
“lastcheck”: “43122.6167475347 [liegt 47 Std. 7 Min. zurück]”,
“uptime”: “100.0000%”,
“uptimetime”: “25 Min. 39 Sek.”,
“downtime”: “0.0000%”,
“downtimetime”: “0 Sek.”,
“updowntotal”: “25 Min. 39 Sek. [=0% Abdeckung]”,
“updownsince”: “43118.4181715278 [liegt 6 Tg. 3 Std. 53 Min. zurück]”,
“info”: “remoteprobe”
}
}

and the XML like this:
<?xml version="1.0" encoding="UTF-8"?>
<sensordata>
	<prtg-version>17.4.33.3283+</prtg-version>
	<name>
		<![CDATA[ifc22 (Slot: 1 Port: 22) - 100 MBit/s]]>
	</name>
	<sensortype>
		<![CDATA[snmptraffic 64bit]]>
	</sensortype>
	<interval>
		<![CDATA[60]]>
	</interval>
	<probename>
		<![CDATA[ZWL-PRTG-PRB1]]>
	</probename>
	<parentgroupname>
		<![CDATA[Testing]]>
	</parentgroupname>
	<parentdevicename>
		<![CDATA[Iost_001_5520 (192.168.152.153) [RMON]]]>
	</parentdevicename>
	<parentdeviceid>  
		<![CDATA[30704]]>
	</parentdeviceid>
	<lastvalue>
		<![CDATA[-]]>
	</lastvalue>
	<lastmessage>
		<![CDATA[Pausiert durch überg. Objekt]]>
	</lastmessage>
	<favorite>
		<![CDATA[]]>
	</favorite>
	<statustext>
		<![CDATA[Pausiert  (Pausiert durch überg. Objekt)]]>
	</statustext>
	<statusid>
		<![CDATA[7]]>
	</statusid>
	<lastup>
		<![CDATA[43122.6167475347 [liegt 46 Std. 50 Min. zurück]]]>
	</lastup>
	<lastdown>
		<![CDATA[-]]>
	</lastdown>
	<lastcheck>
		<![CDATA[43122.6167475347 [liegt 46 Std. 50 Min. zurück]]]>
	</lastcheck>
	<uptime>
		<![CDATA[100.0000%]]>
	</uptime>
	<uptimetime>
		<![CDATA[25 Min. 39 Sek.]]>
	</uptimetime>
	<downtime>
		<![CDATA[0.0000%]]>
	</downtime>
	<downtimetime>
		<![CDATA[0 Sek.]]>
	</downtimetime>
	<updowntotal>
		<![CDATA[25 Min. 39 Sek.  [=0% Abdeckung]]]>
	</updowntotal>
	<updownsince>
		<![CDATA[43118.4181715278 [liegt 6 Tg. 3 Std. 36 Min. zurück]]]>
	</updownsince>
</sensordata>

I don’t see any bandwidth data in there, so I would guess it’s pretty hard :slight_smile:

Maybe ‘lastvalue’ is supposed to be the bandwidth?

Anyway, writing a data source plugin for weathermap isn’t too hard if you know some php. I think I’d recommend the json option, just because the parsing is simpler. Have a look at a basic DS plugin to see how it is supposed to work - the ‘static’ one is the simplest.

right! i’ve used in example a paused device…
it Looks like this with the value:
“lastvalue”: “11 Mbit/Sek.”,

I saw that i can get other forma like this:
{“prtg-version”:“17.4.33.3283”,“treesize”:0,“channels”:[{“name”:“Ausfallzeit”,“lastvalue”:"",“lastvalue”:"",“lastvalue_raw”:""},{“name”:“Datenverkehr ausgehend”,“lastvalue”:“40 MByte”,“lastvalue_raw”:41781455.0000,“lastvalue”:“5.57 Mbit/Sek.”,“lastvalue_raw”:696241.5431},{“name”:“Datenverkehr eingehend”,“lastvalue”:“65 MByte”,“lastvalue_raw”:68146622.0000,“lastvalue”:“9.08 Mbit/Sek.”,“lastvalue_raw”:1135587.7687},{“name”:“Summe”,“lastvalue”:“105 MByte”,“lastvalue_raw”:109928077.0000,“lastvalue”:“15 Mbit/Sek.”,“lastvalue_raw”:1831829.3118}]}

also with raw values…

i will take a look, sadly i don’t have a lot of php Knowledge… maybe someone out there can help me with this (offcourse with a donation!)