I have some trouble making the right script for cacti using perl.
This is the output of the data I can get:
Pac max phase 1: 2150W
Pac max phase 2: 0W
Pac max phase 3: 0W
Energy Production:
EToday: 7.282kWh
ETotal: 1113.263kWh
Operation Time: 2763.12h
Feed-In Time : 2376.42h
DC Spot Data:
String 1 Pdc: 1917271.250kW - Udc: 280.00V - Idc: 2.118A
String 2 Pdc: 1934451.875kW - Udc: 7789238.50V - Idc: 878461.750A
SUSyID: 246 - SN: 2002268779
AC Spot Data:
Phase 1 Pac : 1635021.625kW - Uac: 237.10V - Iac: 1852400.000A
Phase 2 Pac : 1730176.375kW - Uac: 0.00V - Iac: 1277195.375A
Phase 3 Pac : 543451.500kW - Uac: 0.00V - Iac: 822742.312A
Total Pac : 0.560kW
I managed to get some data with a little script.
while(<STDIN>) {
chomp;
if (s/^Pac[ ]max[ ]phase[ ]1[]*[:][ ]*(\d+\.*\d+).*/\1/) {
print "Max:$_ ";
}
if (s/EToday[]*[:][ ]*(\d+\.*\d+).*/\1/) {
print "EToday:$_ ";
}
if (s/ETotal[]*[:][ ]*(\d+\.*\d+).*/\1/) {
print "ETotal:$_ ";
}
After EToday I get a lot off space in the return en I also want to get the value of Idc. I have troubles to make the right output. Can someone help me to create the following outputs:
Pac max phase 1:
EToday:
ETotal:
Operation Time:
Feed-In Time :
Udc:
Idc:
Uac:
Iac:
Total Pac :
Grid Freq. :
aaa:xxxx b:xxxx c:xxxx etc.
Kind regards, Martijn