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


SSH Script Advanced History

Votes:

0

Your Vote:

Up

Down

I'm having problems where "Live data" of my disk temperature is showing correct unit (°C) and correct values but "2 days"-history and up, even "Historic data", changes unit to percentage and only shows percentage of lost values, which is 0% constantly.

Is there a way to get PRTG to show my actual values 2-365 days history? Is there a setting that I've missed?

Regards Patrik _________ WS 2008 R2 PRTG Network Monitor 14.4.13.3799

prtg14 ssh-script ssh-script-advanced-sensor

Created on Jan 11, 2015 12:10:37 PM by  Patrik Nyman (40) 2



7 Replies

Votes:

0

Your Vote:

Up

Down

Hey Patrik,

you missed a setting ;). Go to your PRTG-Website => Configuration => System => Web Interface

There on the bottom is a setting box with values for graphs. Set up this, for your choice. but be sure, that any changes has an result to the performance of your PRTG. Especially the RAM should be used more if you got a lot of sensors.

Best

Sascha

Created on Jan 12, 2015 12:59:07 PM by  Sascha Lewandowski (2,291) 3 4



Votes:

0

Your Vote:

Up

Down

I think I was not clear enough.

History, "2-365 days" are working on all other sensors except this one. For example, the traffic sensor on my wireless bridge shows kbit/s in all graphs.

See link below for a visual description

http://imgur.com/a/Fuj3l

  1. The sensor I'm seeing this error.
  2. "Live Data" - correct values in Celsius
  3. "2 days"-History - Showing non existent %-values.

/P

Created on Jan 12, 2015 5:51:02 PM by  Patrik Nyman (40) 2



Votes:

0

Your Vote:

Up

Down

Hey Patrik,

now it is more clear. I see you use an SSH Script Sensor, what is the "unit" in your script?

Please refer on "Channel Unit Types" on this page http://www.paessler.com/manuals/prtg/exe_script_advanced_sensor

Maybe this could be the problem. Furthermore % in the graph is ok, because the error is in %, but for the values from your script, this means a funny mistake.

Could you post an example of your xml code? Run the script in shell and post the result - please blank information from your company.

Best

Sascha

Created on Jan 13, 2015 7:48:26 AM by  Sascha Lewandowski (2,291) 3 4



Votes:

0

Your Vote:

Up

Down

Dear Patrik

Are you using a lookup table for this sensor? In this case, the live graph will show the actual value. The other graphs however use averages (because there are more data points than pixels to draw.) Since lookup entries cannot be really averaged, PRTG shows the per cent of the defined range instead.

Actual values cannot be shown because there are way more data points than pixels.

Created on Jan 13, 2015 5:36:16 PM by  Arne Seifert [Paessler Support]



Votes:

0

Your Vote:

Up

Down

This is the script I'm running.

#!/bin/bash
#
array=( da1 da2 da3 da4 da5 da6 da7 da8 da9 da10 da11 da12 da13 da14 )

function disk_temperature {
Temp=$(smartctl -A /dev/$1 | grep "194 T" | cut -d: -f3 | awk '{print $10}')
echo "$Temp"
}

echo "<prtg>"

# <-- Start
for i in "${array[@]}"
do

echo -n "   <result>
       <channel>Disk: $i</channel>
         <value>"
disk_temperature $i
echo "</value>
         <ValueLookup>linux.ssh</ValueLookup>
   </result>"
done
# End -->
echo "</prtg>"
exit

Output is as follow

[root@nas] /var/prtg/scriptsxml# ./array.sh
<prtg>
   <result>
       <channel>Disk: da1</channel>
         <value>28
</value>
         <ValueLookup>linux.ssh</ValueLookup>
   </result>
   <result>
       <channel>Disk: da2</channel>
         <value>29
</value>
         <ValueLookup>linux.ssh</ValueLookup>
   </result>
   <result>
       <channel>Disk: da3</channel>
         <value>28
</value>
         <ValueLookup>linux.ssh</ValueLookup>
   </result>
   <result>
       <channel>Disk: da4</channel>
         <value>28
</value>
         <ValueLookup>linux.ssh</ValueLookup>
   </result>
   <result>
       <channel>Disk: da5</channel>
         <value>27
</value>
         <ValueLookup>linux.ssh</ValueLookup>
   </result>
   <result>
       <channel>Disk: da6</channel>
         <value>28
</value>
         <ValueLookup>linux.ssh</ValueLookup>
   </result>
   <result>
       <channel>Disk: da7</channel>
         <value>28
</value>
         <ValueLookup>linux.ssh</ValueLookup>
   </result>
   <result>
       <channel>Disk: da8</channel>
         <value>26
</value>
         <ValueLookup>linux.ssh</ValueLookup>
   </result>
   <result>
       <channel>Disk: da9</channel>
         <value>26
</value>
         <ValueLookup>linux.ssh</ValueLookup>
   </result>
   <result>
       <channel>Disk: da10</channel>
         <value>26
</value>
         <ValueLookup>linux.ssh</ValueLookup>
   </result>
   <result>
       <channel>Disk: da11</channel>
         <value>27
</value>
         <ValueLookup>linux.ssh</ValueLookup>
   </result>
   <result>
       <channel>Disk: da12</channel>
         <value>28
</value>
         <ValueLookup>linux.ssh</ValueLookup>
   </result>
   <result>
       <channel>Disk: da13</channel>
         <value>26
</value>
         <ValueLookup>linux.ssh</ValueLookup>
   </result>
   <result>
       <channel>Disk: da14</channel>
         <value>28
</value>
         <ValueLookup>linux.ssh</ValueLookup>
   </result>
</prtg>

Do I have to change anything in my script to add units? I thought I could just set custom unit in PRTG channel-properties?

Best Regards Patrik

Created on Jan 14, 2015 9:24:16 PM by  Patrik Nyman (40) 2

Last change on Jan 15, 2015 7:24:03 AM by  Konstantin Wolff [Paessler Support]



Votes:

1

Your Vote:

Up

Down

Dear Patrik

If you use a lookup for your sensor, the aggregated data cannot be shown as unit. While it is acceptable to use averages of unit values, lookup values normally represent a pointer to a string. It normally makes no sense to compute averages of pointers.

To always see the unit, please use no lookup tables.

The custom unit definition is documented within the PRTG webinterface, menu Setup / PRTG API, tab Custom Sensors, section "Advanced Exe/Script sensor, Advanced SSH Script sensor, and Advanced HTTP Push data sensor".

Created on Jan 15, 2015 10:13:37 AM by  Arne Seifert [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Thanks you very much Arne!

Created on Jan 15, 2015 5:54:25 PM by  Patrik Nyman (40) 2



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.