George Fendler
asked on
Use MRTG to show Minimum value over time
I am using MRTG to monitor a charge controller at a remote site. I can graph the voltage of the solar panels and the battery bank.
It nicely displays the maximum, average and current values for the period of the graph.
I am not very interested in knowing the maximum value of the battery voltage at night because it won't ever be higher than it is at sunset. I would like to see the minimum voltage for the overnight period. That would help me decide if more or fewer batteries are needed to store the power.
The configuration is as follows:
Target[PacketFluxVoltage]: 1.3.6.1.4.1.32050.2.1.27.5 .10&1.3.6. 1.4.1.3205 0.2.1.27.5 .11:zzzzzz zzzzzzzzzz zzzzz@192. 168.130.14 0:
MaxBytes[PacketFluxVoltage ]: 1375000
Options[PacketFluxVoltage] : growright, gauge, nobanner, absolute, noarrow
Title[PacketFluxVoltage]: Battery V*100(10) and Solar Volts(11)
YLegend[PacketFluxVoltage] : Volts)
YTics[PacketFluxVoltage]: 5
YTicsFactor[PacketFluxVolt age]: 0.1
Factor[PacketFluxVoltage]: 0.01
ShortLegend[PacketFluxVolt age]: Volts
Legend1[PacketFluxVoltage] : Battery Volts
Legend2[PacketFluxVoltage] : Solar Volts
LegendI[PacketFluxVoltage] : Battery
LegendO[PacketFluxVoltage] : Solar
PageTop[PacketFluxVoltage] : <h2>192.168.130.140
<br/> Battery is Battery V*100(10) & Solar is Solar V*100(11)
<br/> PacketFluxVoltage Hall Solar Site</h2>
<div id="sysdetails">
<table>
<tr><td>Expansion Module Description: Base Unit</td></tr>
<tr><td>Analog I/O Description: 10 Battery Volts & 23 Solar Volts</td></tr>
</table>
</div>
It nicely displays the maximum, average and current values for the period of the graph.
I am not very interested in knowing the maximum value of the battery voltage at night because it won't ever be higher than it is at sunset. I would like to see the minimum voltage for the overnight period. That would help me decide if more or fewer batteries are needed to store the power.
The configuration is as follows:
Target[PacketFluxVoltage]:
MaxBytes[PacketFluxVoltage
Options[PacketFluxVoltage]
Title[PacketFluxVoltage]: Battery V*100(10) and Solar Volts(11)
YLegend[PacketFluxVoltage]
YTics[PacketFluxVoltage]: 5
YTicsFactor[PacketFluxVolt
Factor[PacketFluxVoltage]:
ShortLegend[PacketFluxVolt
Legend1[PacketFluxVoltage]
Legend2[PacketFluxVoltage]
LegendI[PacketFluxVoltage]
LegendO[PacketFluxVoltage]
PageTop[PacketFluxVoltage]
<br/> Battery is Battery V*100(10) & Solar is Solar V*100(11)
<br/> PacketFluxVoltage Hall Solar Site</h2>
<div id="sysdetails">
<table>
<tr><td>Expansion Module Description: Base Unit</td></tr>
<tr><td>Analog I/O Description: 10 Battery Volts & 23 Solar Volts</td></tr>
</table>
</div>
What you are asking for is impossible..... let me explain.
Under MRTG is a database called round-robin Database.
That database ONLY contains all values shown, so outside of the graph there are no values.
The MIN, MAX, AVG are computed over available data. ie. only within the graph.
Also the RRD contains exactly the data for all graphs, ie. the 5 minute average values for a day, the half hour average for a weeg, the hourly average for a month as well as the same for a year are efectively 4 tracks within the database where, when the new sample is inserted, the front value updated and if needed the track is advanced one cell.
So if the defaults are used, there is no data available about more then a year ago... and beyond one day there are no 5 minute averages anymore. Because of this principle this is a fast & compact database for a massive amount of values.
Also it graphs very fast as all data ready without any computations.
You could create an additional track in the RRD with say the same definition as the one year track but retains data for say 10 years. Then you will still retain all data. Also remember the datapoints are the X minute averages.
So a MIN on the YEAR track is above the absolute lowest value ever recorded as it is averaged with all values for a day.
If you want the lowest value ever, then you need to do that yourself by recording all values and keep a separate counter (not in RRD) for a lowest & highest value seen.
Under MRTG is a database called round-robin Database.
That database ONLY contains all values shown, so outside of the graph there are no values.
The MIN, MAX, AVG are computed over available data. ie. only within the graph.
Also the RRD contains exactly the data for all graphs, ie. the 5 minute average values for a day, the half hour average for a weeg, the hourly average for a month as well as the same for a year are efectively 4 tracks within the database where, when the new sample is inserted, the front value updated and if needed the track is advanced one cell.
So if the defaults are used, there is no data available about more then a year ago... and beyond one day there are no 5 minute averages anymore. Because of this principle this is a fast & compact database for a massive amount of values.
Also it graphs very fast as all data ready without any computations.
You could create an additional track in the RRD with say the same definition as the one year track but retains data for say 10 years. Then you will still retain all data. Also remember the datapoints are the X minute averages.
So a MIN on the YEAR track is above the absolute lowest value ever recorded as it is averaged with all values for a day.
If you want the lowest value ever, then you need to do that yourself by recording all values and keep a separate counter (not in RRD) for a lowest & highest value seen.
ASKER
arnold, How do I use another graph? The granularity of the graph doesn't give me enough precision. I tried scaling the graph differently and it produces a hugh graphic that isnt' readable.
noci, I don't think I was clear enough of what I want. I understand that I can't get the absolute lowest value for voltage. What I would really like to see is the lowest average measurement period. I can see these values in the log file. I could probably write a program to extract that value pretty easily. I was hoping that there was a command or parameter that I could put in the configuration file that would extract and display the minimum voltage under the graph where it currently displays only Max, Average and current voltage
MRTGvolts.PNG
noci, I don't think I was clear enough of what I want. I understand that I can't get the absolute lowest value for voltage. What I would really like to see is the lowest average measurement period. I can see these values in the log file. I could probably write a program to extract that value pretty easily. I was hoping that there was a command or parameter that I could put in the configuration file that would extract and display the minimum voltage under the graph where it currently displays only Max, Average and current voltage
MRTGvolts.PNG
One option is to use rrdtool to collect information and draw graphs on demand.
Rrdtool has a logarithmic scale option
Mrtg draws a new graph as soon as the new data is polled.
What other datapoints can you pull using snmp?
Can you pull current draw from the panel?
Or battery draw, during day time the current draw from the battery will be less or negative, while at night all the draw will be from the battery.
Rrdtool has a logarithmic scale option
Mrtg draws a new graph as soon as the new data is polled.
What other datapoints can you pull using snmp?
Can you pull current draw from the panel?
Or battery draw, during day time the current draw from the battery will be less or negative, while at night all the draw will be from the battery.
ASKER
I will take a look at the rrdtool.
The PacketFlux Site Monitor connects to a MorningStar charge controller and retrieves a lot of information. It also allows interaction to initialize events, etc.
The SNMP values that can be retrieved remotely are as follows:
Temperature (0.1C)
Shunt Input (0.1mV)
Power 1 In (0.1V)
Power 2 In (0.1V)
Exp Current (mA)
Relay on Above (0.1C)
Relay on Below (0.1C)
Charge AH*10
Charge KwH*10
Load AH*10
Battery V*100
Solar Volts*100
Load Volts*100
Avg Batt V*100
Ref. Volts*100
Charge Amps*100
Load Amps*100
Heatsink Temp(C)
Battery Temp(C)
Ambient Temp(C)
RTS Temp(C)
Charge Watts*100
Arry Vmp*100
Arry Pmax(W*100)
Arry Voc*100
Low Discon V*100
Total Chrg AH*10
Total Load AH*10
Controller Hours
Array Fault Bits
Load Fault Bits
Alarm Bits
DipSwitch Bits
Tdy MinBattV*100
Tdy MaxBattV*100
Tdy Charge AH
Tdy Load AH
Tdy Ary Flt Bits
Tdy Ld Flt Bits
Tdy Alarm Bits
Min Batt V*100
Max Batt V*100
Absorb V*100
Float V*100
Equalize V*100
ChgHiDiscV*100
ChgHiReconV*100
LdLowDiscV*100
LdLwDscDly(S*10)
LdLowReconV*100
LdHiDiscV*100
LdHiReconV*100
MPPT LimitA*100
DaysBetwnEqlz
DaysSinceEqlz
The PacketFlux Site Monitor connects to a MorningStar charge controller and retrieves a lot of information. It also allows interaction to initialize events, etc.
The SNMP values that can be retrieved remotely are as follows:
Temperature (0.1C)
Shunt Input (0.1mV)
Power 1 In (0.1V)
Power 2 In (0.1V)
Exp Current (mA)
Relay on Above (0.1C)
Relay on Below (0.1C)
Charge AH*10
Charge KwH*10
Load AH*10
Battery V*100
Solar Volts*100
Load Volts*100
Avg Batt V*100
Ref. Volts*100
Charge Amps*100
Load Amps*100
Heatsink Temp(C)
Battery Temp(C)
Ambient Temp(C)
RTS Temp(C)
Charge Watts*100
Arry Vmp*100
Arry Pmax(W*100)
Arry Voc*100
Low Discon V*100
Total Chrg AH*10
Total Load AH*10
Controller Hours
Array Fault Bits
Load Fault Bits
Alarm Bits
DipSwitch Bits
Tdy MinBattV*100
Tdy MaxBattV*100
Tdy Charge AH
Tdy Load AH
Tdy Ary Flt Bits
Tdy Ld Flt Bits
Tdy Alarm Bits
Min Batt V*100
Max Batt V*100
Absorb V*100
Float V*100
Equalize V*100
ChgHiDiscV*100
ChgHiReconV*100
LdLowDiscV*100
LdLwDscDly(S*10)
LdLowReconV*100
LdHiDiscV*100
LdHiReconV*100
MPPT LimitA*100
DaysBetwnEqlz
DaysSinceEqlz
Which corresponds to Solar Voltage? you might want to draw that as its own graph as well as
through MRTG pulls one record at a time.
3.6.1.4.1.32050.2.1.27.5.1 0&1.3.6.1. 4.1.32050. 2.1.27.5.1 1
You have many data points that potentially can answer the question you have
Using some of those data points might help shed light on the data/representation you are after.
chargeAMP could be an interesting view, i.e. at noon, the chargeAMP drops, i.e. the battery is full. charge related information should convey when the circuitry cuts off the solar charging if at all, this would likely point that an additional capacity might be worth while to store while the sun is out, i.e. your panel generate more current than you have capacity to store.
The different load info may help as well, i.e. during the day you have a large demand that is sustained by the panel while at night the load drops and the need is not there...
You have to define the criteria of interest to you and perhaps the options available will be in a position to convey.
graphing the load
you have to define what you
it sounds you are trying to come up with a single graph to convey the information.
It might be possible, but I am not sure I can formulate complete which data point you are interested in to suggest.
through MRTG pulls one record at a time.
3.6.1.4.1.32050.2.1.27.5.1
You have many data points that potentially can answer the question you have
Using some of those data points might help shed light on the data/representation you are after.
chargeAMP could be an interesting view, i.e. at noon, the chargeAMP drops, i.e. the battery is full. charge related information should convey when the circuitry cuts off the solar charging if at all, this would likely point that an additional capacity might be worth while to store while the sun is out, i.e. your panel generate more current than you have capacity to store.
The different load info may help as well, i.e. during the day you have a large demand that is sustained by the panel while at night the load drops and the need is not there...
You have to define the criteria of interest to you and perhaps the options available will be in a position to convey.
graphing the load
you have to define what you
it sounds you are trying to come up with a single graph to convey the information.
It might be possible, but I am not sure I can formulate complete which data point you are interested in to suggest.
ASKER
I am currently monitoring solar and battery current and voltage, Charg watts and several other conditions.
This power plant powers a remote wireless Internet site with several access points, a router, switch and of course the site monitor device.
The days are getting shorter so the charging time is becoming more limited.
The battery life will be affected if the battery voltage is allowed to get too low. If I can keep it above 23 volts, I know by experience that the batteries will last 4 years. Otherwise they don't.
I can look at the .log file for the voltage graph and sort the column with the battery voltage and find the lowest voltage (just before dawn).
So far, when I do that the lowest I see is 25.08.
It would just be nice to be able to have the legend at the bottom of the graph show MIN instead of MAX. I was hoping that there was some switch that I could use in the configuration file to flip that value.
Oh well.
This power plant powers a remote wireless Internet site with several access points, a router, switch and of course the site monitor device.
The days are getting shorter so the charging time is becoming more limited.
The battery life will be affected if the battery voltage is allowed to get too low. If I can keep it above 23 volts, I know by experience that the batteries will last 4 years. Otherwise they don't.
I can look at the .log file for the voltage graph and sort the column with the battery voltage and find the lowest voltage (just before dawn).
So far, when I do that the lowest I see is 25.08.
It would just be nice to be able to have the legend at the bottom of the graph show MIN instead of MAX. I was hoping that there was some switch that I could use in the configuration file to flip that value.
Oh well.
I do not believe mrtg by itself was geared for. You could using mrtg poll data and use a script that would collect, build info based on your need.
You could invert I.e. Devide by the value
I.e data pulled would invert so that
1/(bat voltage read/nominal_voltage)
The resulting max will reflect the lowest value of battery read
You could invert I.e. Devide by the value
I.e data pulled would invert so that
1/(bat voltage read/nominal_voltage)
The resulting max will reflect the lowest value of battery read
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks. I will try rddtool. If that won't do the job, I can always write a script to read the log file and do it that way.
Is there a way to pull info just based on panel voltage. Possibly subtracting the battery voltage would reflect only the panel..
What other info is available, current flow from panel?
Using the current, multiplier, using a logarithmic graph ......