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.32050.2.1.27.5.11:zzzzzzzzzzzzzzzzzzzzz@192.168.130.140:
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[PacketFluxVoltage]: 0.1
Factor[PacketFluxVoltage]: 0.01
ShortLegend[PacketFluxVoltage]: 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 &nbsp; 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>
LVL 2
George FendlerprogrammerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

arnoldCommented:
You are using max, try another graph that uses unscaled
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 ......
0
nociSoftware EngineerCommented:
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.
0
George FendlerprogrammerAuthor Commented:
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
0
Discover the Answer to Productive IT

Discover app within WatchGuard's Wi-Fi Cloud helps you optimize W-Fi user experience with the most complete set of visibility, troubleshooting, and network health features. Quickly pinpointing network problems will lead to more happy users and most importantly, productive IT.

arnoldCommented:
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.
0
George FendlerprogrammerAuthor Commented:
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
0
arnoldCommented:
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.10&1.3.6.1.4.1.32050.2.1.27.5.11

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.
0
George FendlerprogrammerAuthor Commented:
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.
0
arnoldCommented:
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
0
arnoldCommented:
Using rrdtool to collect, and generate graphs on demand (graphs are generated only on access, they are not generate when data is polled, deals with behavior on webpage .


But the following might be the item of interest you might benefit from
Includes the min, max, avg current in config..
https://oss.oetiker.ch/rrdtool/doc/rrdinfo.en.html

You do not need to completely switch, you could add a new graph pulling the same info and see as a comparison going forward with your existing graph...
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
George FendlerprogrammerAuthor Commented:
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.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Network Management

From novice to tech pro — start learning today.