What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Support for ALLNET DEVICES

Votes:

0

Are there Any Supportet AllNet Devices such as Sensorappliances or Powermeter?

allnet custom-script-exe custom-sensor powershell

Created on Nov 18, 2011 2:17:45 AM

Last change on Mar 16, 2015 5:04:15 PM by  Martina Wittmann [Paessler Support]



Best Answer

Accepted Answer

Votes:

2

Unfortunately they dont '(most of them). However, I found a workaround for the Allnet Powermeter 3690. I wrote a litte Powershell script which does some extraction of the ampere-values of the mainpage of thouse devices, and retuns them to PRTG in three different channels. The respective Powervaluecalculation can then be done by a formula-sensor. Works prettyy well for me, but rewuires Version 2.x Firmware on the devices.

# Test and Demo PowerShell Custom Sensor for PRTG
# Just a dirty hack using Powershell
# Requires: 
# + PowerShell v. 2.0 on the local Probe
# 
# Required Parameters:
# + %device %linuxuser %linuxpassword (take care on the sequence)
# In case user/pass is required use the ssh user/pass, becaus the api
# does not provide webuser/webpass as parameters or give user and pass directly
# as commandline parameters 
#
# Hardcoded (covers Firmwarerev. 1.x, setting for FW >1.x differ):
# + deviceurl : /std_display.php?s=1
#
# Written and Cpoyright by: Andreas Hümmer <[email protected]> 
# Elaxy BSS GmbH & Co KG 
#
# Version
#  20.11.2011   V 0.1  initial release
#

$DEVICE=$args[0]
$USER=$args[1]     # not used in this version
$PWD=$args[2]      # not used in this version
##echo $DEVICE
$URL="http://"+$DEVICE+"/std_display.php?s=1"
##$URL = "http://sys-cob-pom-001.elaxy.org/std_display.php?s=1"
$webclient = new-object System.Net.WebClient
$webpage = $webclient.DownloadString($URL)

$webpage = $webpage.replace("PowerMeter.findAndCreateClocks(","#####") 
$webpage = $webpage.replace(");","#####") -split("#####") 

##$webpage[1]

$amps = $webpage[1] -split(",")

##$amps
$amps[0]= $amps[0].replace("'","")
$amps[1]= $amps[1].replace("'","")
$amps[2]= $amps[2].replace("'","")
$amps[0]=$amps[0].replace(".",",")
$amps[1]=$amps[1].replace(".",",")
$amps[2]=$amps[2].replace(".",",")

$amps[0]= [System.Convert]::ToDecimal($amps[0])
$amps[1]= [System.Convert]::ToDecimal($amps[1])
$amps[2]= [System.Convert]::ToDecimal($amps[2])

 "<prtg>"
    "<result>"
        "<channel>"
            "Strom Phase 1"
        "</channel>"
        "<value>"
            echo $amps[0]
        "</value>"
        "<FLOAT>1</FLOAT>"
        "<CustomUnit>A</CustomUnit>"
    "</result>"
    "<result>"
        "<channel>"
            "Strom Phase 2"
        "</channel>"
        "<value>"
            echo $amps[1]
        "</value>"
        "<FLOAT>1</FLOAT>"
        "<CustomUnit>A</CustomUnit>"
    "</result>"
    "<result>"
        "<channel>"
            "Strom Phase 3"
        "</channel>"
        "<value>"
            echo $amps[2]
        "</value>"
        "<FLOAT>1</FLOAT>"
        "<CustomUnit>A</CustomUnit>"
    "</result>"
    
 "</prtg>"

For the All4000 I found an older version of a custom sensor, but unfotunately it seems to habe trouble with the most recent firmware. Either way, as the ALL3000 did, die ALL4000 (and I guess all devices in that family) have a xml-interface [devicename]/xml, which can easily be used by the xml.sensor of PRTG.

Created on Nov 21, 2011 3:28:38 PM

Last change on Jun 5, 2015 1:15:43 PM by  Torsten Lindner [Paessler Support]



6 Replies

Votes:

0

hallo,

do the devices support SNMP?

does Allnet offer any MIBs?

If so, you can import the MIBs using our free MIB importer

https://www.paessler.com/tools/mibimporter

Created on Nov 21, 2011 10:28:29 AM by  Aurelio Lombardi [Paessler Support]



Accepted Answer

Votes:

2

Unfortunately they dont '(most of them). However, I found a workaround for the Allnet Powermeter 3690. I wrote a litte Powershell script which does some extraction of the ampere-values of the mainpage of thouse devices, and retuns them to PRTG in three different channels. The respective Powervaluecalculation can then be done by a formula-sensor. Works prettyy well for me, but rewuires Version 2.x Firmware on the devices.

# Test and Demo PowerShell Custom Sensor for PRTG
# Just a dirty hack using Powershell
# Requires: 
# + PowerShell v. 2.0 on the local Probe
# 
# Required Parameters:
# + %device %linuxuser %linuxpassword (take care on the sequence)
# In case user/pass is required use the ssh user/pass, becaus the api
# does not provide webuser/webpass as parameters or give user and pass directly
# as commandline parameters 
#
# Hardcoded (covers Firmwarerev. 1.x, setting for FW >1.x differ):
# + deviceurl : /std_display.php?s=1
#
# Written and Cpoyright by: Andreas Hümmer <[email protected]> 
# Elaxy BSS GmbH & Co KG 
#
# Version
#  20.11.2011   V 0.1  initial release
#

$DEVICE=$args[0]
$USER=$args[1]     # not used in this version
$PWD=$args[2]      # not used in this version
##echo $DEVICE
$URL="http://"+$DEVICE+"/std_display.php?s=1"
##$URL = "http://sys-cob-pom-001.elaxy.org/std_display.php?s=1"
$webclient = new-object System.Net.WebClient
$webpage = $webclient.DownloadString($URL)

$webpage = $webpage.replace("PowerMeter.findAndCreateClocks(","#####") 
$webpage = $webpage.replace(");","#####") -split("#####") 

##$webpage[1]

$amps = $webpage[1] -split(",")

##$amps
$amps[0]= $amps[0].replace("'","")
$amps[1]= $amps[1].replace("'","")
$amps[2]= $amps[2].replace("'","")
$amps[0]=$amps[0].replace(".",",")
$amps[1]=$amps[1].replace(".",",")
$amps[2]=$amps[2].replace(".",",")

$amps[0]= [System.Convert]::ToDecimal($amps[0])
$amps[1]= [System.Convert]::ToDecimal($amps[1])
$amps[2]= [System.Convert]::ToDecimal($amps[2])

 "<prtg>"
    "<result>"
        "<channel>"
            "Strom Phase 1"
        "</channel>"
        "<value>"
            echo $amps[0]
        "</value>"
        "<FLOAT>1</FLOAT>"
        "<CustomUnit>A</CustomUnit>"
    "</result>"
    "<result>"
        "<channel>"
            "Strom Phase 2"
        "</channel>"
        "<value>"
            echo $amps[1]
        "</value>"
        "<FLOAT>1</FLOAT>"
        "<CustomUnit>A</CustomUnit>"
    "</result>"
    "<result>"
        "<channel>"
            "Strom Phase 3"
        "</channel>"
        "<value>"
            echo $amps[2]
        "</value>"
        "<FLOAT>1</FLOAT>"
        "<CustomUnit>A</CustomUnit>"
    "</result>"
    
 "</prtg>"

For the All4000 I found an older version of a custom sensor, but unfotunately it seems to habe trouble with the most recent firmware. Either way, as the ALL3000 did, die ALL4000 (and I guess all devices in that family) have a xml-interface [devicename]/xml, which can easily be used by the xml.sensor of PRTG.

Created on Nov 21, 2011 3:28:38 PM

Last change on Jun 5, 2015 1:15:43 PM by  Torsten Lindner [Paessler Support]



Votes:

2

Just a FollowUP to Allnet devices in general an to ALLNet Powermeters in particular.

AFAIK the following devices should have proper support for XML so you can use the XML/REST sensor:

Sensorappliances:

All3000/All4000/All4500/ALL5000.

While for all3000/4000 you can use /xml and specifiling the propper xml-tag (e.g. "t0") the syntax for the all4500, all4076 and all500 differs. With that devices you have to put e.g. /xml/?mode=sensor&type=list&id=1 and specify "current" ingerneral as the xml-tag to evaluate. The ID can be found in the properties of the attached sensor.

Powermeters:

Unfortunately the are different Softwareversions around in the wild, all claiming to be 2.00.00. Earlier in this threat, the mentioned script is for the "old" 2.0.0 (can be identified by a completely in black desinged webpage. So the above given script should work well with thouse devices. The newer ones (newer PM1 and in gernaral all PM2) can be identified bei the now typical Allnet Webpagedesing in black, orange and blue). With this newer version the syntax changed. The good nes is that this new version also have a xml-interface, but this is only usefull for querying the intern sqlite database, so you can get all kind of summary-informations or histroic informations. The bad news: I found this allmoost sensles for PRTG. However, you still can get the current sensorreadings out of that devices by using /query_live.php?id=2 The result is a JSON string, containing the values vor the phases, the power calculations an the readings of d0/1 and s0/1 readings

A ps-script to get thouse readings into PRTG is work in progress and will be posted here when ready. (I tried to get the direct access to the JSON via XMLRest sensor, but without success)

Created on Jun 3, 2015 9:23:03 AM

Last change on Jun 8, 2015 5:03:27 AM by  Felix Saure [Paessler Support]



Votes:

1

A general description for the use of xml interfaces for Allnet devices can be found here: ftp://212.18.29.48/ftp/pub/joerg/Hilfestellung.XML.3418-4500.pdf

Created on Jun 3, 2015 9:27:33 AM



Votes:

0

After a call to AllNet it turned out, that the first version of the script is based on FW 1.x and not on 2.x.

Created on Jun 3, 2015 4:30:34 PM



Votes:

4

So finally I got a littel working PS hack for the deviec running a V2 Firmware: (corrected v 0.5)

# Test and Demo PowerShell Custom Sensor for PRTG
# Just a dirty hack using Powershell
# Requires: 
# + PowerShell v. 4.0 on the local Probe
# 
#
# Required Parameters:
# + %device +%url %linuxuser %linuxpassword (take care on the sequence)
# In case user/pass is required use the ssh user/pass, becaus the api
# does not provide webuser/webpass as parameters or give user and pass directly
# as commandline parameters 
#
# Hardcoded (covers Firmwarerev. 2.x, setting for FW 1.x  differ):
# + deviceurl : /query_live.php?id=2
#
# Written and Cpoyright by: Andreas Hümmer <[email protected]> 
# Elaxy BSS GmbH & Co KG 
#
# Version
#  01.06.2015   V 0.1  initial release
#  05.06.2015   V 0.5  JSON Version

$DEVICE=$args[0]
$URL=$args[1]	# not used in this version	
$USER=$args[2]     # not used in this version
$PWD=$args[3]      # not used in this version


$objWebClient = (New-Object System.Net.WebClient)
$result = $objWebClient.DownloadString("http://$DEVICE/query_live.php?id=3")|ConvertFrom-Json


$res0=[Double]$result.0 
$res1=[Double]$result.1
$res2=[Double]$result.2
$res3=[Double]$result.3
$res4=[Double]$result.4
$res5=[Double]$result.5

Write-Host @"
<prtg>
    <result>
        <channel>
            Strom Phase A-1
        </channel>
        <value>
            $res0 
        </value>
        <FLOAT>1</FLOAT>
        <CustomUnit>A</CustomUnit>
    </result>
    <result>
        <channel>
            Strom Phase A-2
        </channel>
        <value>
            $res1
        </value>
        <FLOAT>1</FLOAT>
        <CustomUnit>A</CustomUnit>
    </result>
    <result>
        <channel>
            Strom Phase A-3
        </channel>
        <value>
            $res2
        </value>
        <FLOAT>1</FLOAT>
        <CustomUnit>A</CustomUnit>
    </result>
        <result>
        <channel>
            Strom Phase B-1
        </channel>
        <value>
            $res3
        </value>
        <FLOAT>1</FLOAT>
        <CustomUnit>A</CustomUnit>
    </result>
        <result>
        <channel>
            Strom Phase B-2
        </channel>
        <value>
            $res4
        </value>
        <FLOAT>1</FLOAT>
        <CustomUnit>A</CustomUnit>
    </result>
        <result>
        <channel>
            Strom Phase B-3
        </channel>
        <value>
            $res5
        </value>
        <FLOAT>1</FLOAT>
        <CustomUnit>A</CustomUnit>
    </result>
</prtg>
"@

After I get a V3 firmware device I ll try to implement a version for that too.

If anyone requires another AllNet device, pleas tell me, and I see what I can do.

Created on Jun 5, 2015 10:34:36 AM

Last change on Jun 5, 2015 1:15:20 PM by  Torsten Lindner [Paessler Support]




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.