From: Steve B <rec...@gm...> - 2015-09-09 09:49:16
|
This works incredibly well, nice coding - thanks, really useful for me! Hopefully there will be a new package for devmon soon as there are some essential additions out there. On Thu, Sep 3, 2015 at 11:20 AM, W.J.M. Nelis <Wim...@nl...> wrote: > Hello Steve, > > thanks for this, was just looking into this as a collegue reminded me that >> you had suggested using this in a previous question I had asked for >> Xymon/devmon a few months ago. He has a better memory than I do! >> >> Thanks a lot, will add this transform and check it out >> > > In the template we are using for an Eaton UPS, the STATISTIC transform is > used in the way you plan to do. As an example, the template is shown below. > > ----- exceptions ----- > ----- message ----- > <center>== Information from UPS ==</center> > > Vendor: {upsManufacturer} > Model: {upsModel} > > Battery status: {upsBattStatus} > Runtime remaining: {upsEstTimeRem} [minute] > Charge remaining: {upsEstChargeRem} % > Total output power: {upsOutTotPower} [kW] > Time on battery: {upsOnBattery} [s] > > Output parameters > TABLE:noalarmsmsg > Phase|Voltage [V]|Current [A]|Power [W]|cos(φ)|Load > > {upsOutIndex}|>{upsOutVoltage}|>{upsOutCurrent}|>{upsOutPower}|>{upsOutCosPhi}|>{upsOutLoad} > <!-- > TotalPower : {upsOutTotPwrRaw} > --> > ----- oids ----- > upsManufacturer : .1.3.6.1.2.1.33.1.1.1.0 : leaf > upsModel : .1.3.6.1.2.1.33.1.1.2.0 : leaf > upsBattStatNum : .1.3.6.1.2.1.33.1.2.1.0 : leaf > upsOnBattery : .1.3.6.1.2.1.33.1.2.2.0 : leaf > upsEstTimeRem : .1.3.6.1.2.1.33.1.2.3.0 : leaf > upsEstChargeRem : .1.3.6.1.2.1.33.1.2.4.0 : leaf > # > upsOutIndex : .1.3.6.1.2.1.33.1.4.4.1.1 : branch > upsOutVoltage : .1.3.6.1.2.1.33.1.4.4.1.2 : branch > upsOutCurrntRaw : .1.3.6.1.2.1.33.1.4.4.1.3 : branch > upsOutPower : .1.3.6.1.2.1.33.1.4.4.1.4 : branch > upsOutLoadRaw : .1.3.6.1.2.1.33.1.4.4.1.5 : branch > ----- thresholds ----- > ----- transforms ----- > upsBattStatus : SWITCH : {upsBattStatNum} 1=Unknown, 2=Normal, 3=Low, > 4=Depleted > upsOutCurrent : MATH : {upsOutCurrntRaw} / 10 : 1 > upsOutLoad : MATH : {upsOutLoadRaw} / 100 : 2 > # Compute phase shift between voltage and current. > upsOutCosPhi : MATH : {upsOutPower} / ( {upsOutVoltage} * > {upsOutCurrent} ) : 2 > # Just for fun, compute the total power. > upsOutTotPwrRaw : STATISTIC : {upsOutPower} SUM > upsOutTotPower : MATH : {upsOutTotPwrRaw} / 1000 : 1 > > > > > |