New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


How can I monitor environmental parameters with ALLNET ALL4000 and ALL3000 and PRTG?

Votes:

0

Your Vote:

Up

Down

We are using the ALLNET ALL4000 Ethernet Sensormeter to monitor room temperatures (See: http://www.allnet.de/home-automation.html).

How can I use PRTG with the ALL4000?

custom-script-exe custom-sensor environment google-code prtg temperature

Created on Mar 10, 2010 12:17:58 PM by  Dirk Paessler [Founder Paessler AG] (10,858) 3 4

Last change on Mar 20, 2015 1:28:21 PM by  Martina Wittmann [Paessler Support]



3 Replies

Accepted Answer

Votes:

0

Your Vote:

Up

Down

There is a custom sensor for PRTG that works with the ALL4000.

This sensor gets values from an ALLNET 4000 (ALLNET 3000 should be compatible) via XML HTTP Interface.

When using the EXE as a custom sensor you must supply three parameters:

ValueDescription
1st parameterIPIP-address of the device
2nd parameter0-15Desired value # (starting at zero)
3rd parameterCURRENT, MIN, or MAXValue Type (The device provides the current, the minimum and the maximum values)

The sensor returns the selected value from the selected sensor. If the sensor is an temperature sensor you must set it as a float value in prtg (important!).

Example: You want to read current value of the first temperature sensor on IP Adress 192.168.0.100

Command line options: 192.168.0.100 0 CURRENT

You can download the binaries from our Google Code project:

The sources are also available:

Thanks to Marc Fuhrmeister for sharing this custom sensor.

Created on Mar 10, 2010 12:30:12 PM by  Dirk Paessler [Founder Paessler AG] (10,858) 3 4

Last change on Mar 10, 2010 12:53:54 PM by  Daniel Zobel [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Diese Lösung funktioniert nicht mehr, da in der neuesten Gerätegeneration die Sensoren nicht mehr via SNMP erreichbar sind.

Ich werde einen Customscriptsensor programmieren, der die Daten von der XML Webseite des Allnetgerätes abholt und aufbereitet PRTG zur Verfügung stellt.

Created on Jun 10, 2011 8:06:32 AM by  Andreas Luithle (0) 1



Votes:

11

Your Vote:

Up

Down

We use an old Allnet All3000 web thermometer to monitor critical room temperatures. I have written two scripts to monitor this device, using the text-only output or the xml-output. Feel free to comment and improve.

Script using the xml-output

#Script monitors the output of an Allnet All3000 thermometer device.
#User manual (German): ftp://212.18.29.48/ftp/pub/allnet/verschiedene/all3000/ALL3000_Handbuch_001.pdf
#We currently have only three channels active with temperature probes
#tbd: modification to allow descriptive name for each channel
#MRO 2016-09-21

#variables
[string] $prtgresult=''
$securepassword = ConvertTo-SecureString "password" -AsPlainText -Force     #password for device
$credentials = New-Object System.Management.Automation.PSCredential("Admin", $securepassword)    #username for device
$url = "http://all3000.domain.internal/xml"   #URL of the All3000 device, make sure to add /xml for xml-formatted return string!

cls

#retrieve xml output from device
[xml] $xml=Invoke-WebRequest  -Uri $url -Credential $credentials -UseBasicParsing
#[xml] $xml= [xml] (get-content -Path c:\temp\temp.xml)  #for testing only


#build header for PRTG XML-file
$prtgresult+="<?xml version=""1.0"" encoding=""Windows-1252"" ?>`r`n"
$prtgresult+="<prtg>`r`n"

#build PRTG results data, adjust number of channels as needed. Only consecutive channels are supported, max. 0 - 7.
for ($i=0; $i -le 2; $i++)  
{

write-host "  Processing Datapoint :" $i
        #this loops through the output fiels xml.data.t0 ... t7
        $value= '$xml.xml.data.t' + "$i"|invoke-expression
        write-host $value 
		$prtgresult+="    <result>`r`n"
		$prtgresult+="        <channel>Channel "+$i+" </channel>`r`n"
		$prtgresult+="        <value>"+$value +"</value>`r`n"
		$prtgresult+="        <float>1</float>`r`n"
		$prtgresult+="        <mode>absolute</mode>`r`n"
		$prtgresult+="        <unit>Temperature</unit>`r`n"
        $prtgresult+="    </result>`r`n"
		
	}

$prtgresult+="</prtg>"

#send data to host
Write-Host $prtgresult

Alternative approach, using the text-output:

#Script monitors the output of an Allnet All3000 Device.
#We currently have only three channels active with temperature probes
#Tbd: Better string handling that can cope with variable lengths of the readouts


#Variables
$outputfile = 'c:\temp\output.txt' #for debug purposes
$result = '' #output for file

$Value=''      #returned string from All3000
$Value1 = ''
$Value2 = ''
$Value3 = '' #only three channels are in use, extend as needed

$securepassword = ConvertTo-SecureString "password" -AsPlainText -Force   #password for the All3000 device
$credentials = New-Object System.Management.Automation.PSCredential("Admin", $securepassword)   #user for the All3000 device
$url = "http://all3000.domain.internal/s"	#URL of the All3000 device, make sure you add the /s to get the text-only output!

#retrieve current values from All3000
$value=(Invoke-WebRequest  -Uri $url -Credential $credentials -UseBasicParsing).rawcontent

#cut off headers and unneeded garbage
$value=$Value.Remove(0,85)
$value=$value.Split("U",2)
$value=$value[0]
$value

#reformat return string and check for letters (device sometimes has sudden reboots an returns garbage chars then)
#separate active channels from inactive and select active part
$Value=$Value.Split("-")
$Value=$Value[0]
$Value

#get first value (will only work with 2-digit temperatures :-(
$Value1=$Value.substring(1,4).Insert(2,".")
if($value1 -match  '[a-z]'){
$Value1=""}
$value1

# get second value
$Value2=$Value.substring(6,4).Insert(2,".")
if($value2 -match  '[a-z]'){
$Value2=""}
$value2

#get third value - continue as necessary if you have more channels
$Value3=$Value.substring(11,4).Insert(2,".")
if($value3 -match  '[a-z]'){
$Value3=""}
$value3

#check for completely empty string in case of device malfunction, append valid results to output file
$checkresult=$Value1 + $Value2 + $Value3
if ($checkresult -ne "") {

	#add timestamp
	$now=(get-date -Format "yyyy-MM-dd HH:mm:ss").tostring()

	#build result string for debug log
	$result=$now + ";" + $Value1 + ";" + $Value2 + ";" + $Value3

	
#	uncomment for debug log on hdd, log an be used eg. in Excel
#	$result|out-file $outputfile -Append 

#output prtg xml code - a little clumsy, to allow explicit names for each sensor
#extend as needed if more channels are in use
write-host "<?xml version="1.0" encoding="UTF-8" ?>"
write-host "<prtg>"
write-host "<result>"
write-host "<channel>Serverraum1</channel>"
write-host "<value>$Value1</value>"
write-host "<Unit>Temperature</Unit>"
write-host "<float>1</float>"
write-host "<LimitMode>1</LimitMode>"
write-host "<LimitMaxWarning>28</LimitMaxWarning>"
write-host "<LimitMaxError>30</LimitMaxError>"
write-host "<LimitErrorMsg>Kühlung ausgefallen!</LimitErrorMsg>"
write-host "</result>"

write-host "<result>"
write-host "<channel>Serverraum2</channel>"
write-host "<value>$Value2</value>"
write-host "<Unit>Temperature</Unit>"
write-host "<float>1</float>"
write-host "<LimitMode>1</LimitMode>"
write-host "<LimitMaxWarning>28</LimitMaxWarning>"
write-host "<LimitMaxError>30</LimitMaxError>"
write-host "<LimitErrorMsg>Kühlung ausgefallen!</LimitErrorMsg>"
write-host "</result>"

write-host "<result>"
write-host "<channel>Unterverteiler 1</channel>"
write-host "<value>$Value3</value>"
write-host "<Unit>Temperature</Unit>"
write-host "<float>1</float>"
write-host "<LimitMode>1</LimitMode>"
write-host "<LimitMaxWarning>28</LimitMaxWarning>"
write-host "<LimitMaxError>30</LimitMaxError>"
write-host "<LimitErrorMsg>Kühlung ausgefallen!</LimitErrorMsg>"
write-host "</result>"
write-host "</prtg>"
}
else
{
write-host "<prtg>"
write-host "<error>1</error>"
write-host "<text>Thermometer ist ausgefallen!</text>"
write-host "</prtg>"
}

Created on Sep 21, 2016 8:28:02 AM by  msroedel (432) 4 3



Please log in or register to enter your reply.


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.