I have need monitor an electric generator with modbus, my problem is i can't create warning threshold and critical threshold for monitor the voltage of the battery, EDF and others components such as water temperature of motor, pression oil, temeratur oil...
On the script comment, i have informations :
--warning-* Warning threshold (can be 'unique' or 'global') (Override config if set)
--critical-* Critical threshold (can be 'unique' or 'global') (Override config if set)
I not anderstand this information, wished for have threshold warning at 270 and seuil critical at 265...
Other problem, i can't format return value. ex: value return 275, return value wished 27,5.
you could then try to either add “ "critical": "220:" ” below aggregation to get a threshold critical at 110 (whatever the value is)
or you can try to add “ --critical-global-batteryTension
you could also add “ "custom": "/ 10" ” below aggregation to divide the metric by 10 if you need to divide the metric
be aware of the “_” and the “-” in the metric name, it can be problematic sometime
I’m not sure if the custom property works, i don’t really have modbus anymore to test, but it worked somewhat when I was putting the critical value inside the virtual curve and not on command line
@centreon (or anyone reading) the plugin page for the modbus links to a 404 error
Thank you very much christophe.niel-ACT and cg-tw for your help, I can now monitor my generator, here is my feedback:
I create a configuration file with the information from the post, and I create 2 others virtualcurve to have the metric consumption in Watt and % load for each phase, see below my config file json :
OK: Global metrics are OK | 'generatorCourantPhase1'=15.3A;0:45;0:50;; 'generatorLoadPhase1'=21.165%;;;; 'generatorPuissancePhase1'=3.519W;;;; Metric 'generatorCourantPhase1' value is 15.30A # (calcul : value /10 => 1530/10 = 15.3A) Metric 'generatorLoadPhase1' value is 21.16% # (calcul : value 15.3A => /10*83/60 = 21.16%) factor of load generator 83% and 60A/phase Metric 'generatorPuissancePhase1' value is 3.52KW # (calcul : value 15.3A => /10*230/1000 = 3.52KW) 3520W => 3.5KW
On the other hand I did not find to have my 3 phases of voltage a monitoring and also the temperature, oil pressure, rpm of the engine on another monitoring, of the blow I had to create for the moment a monitoring by type see below:
CRITICAL: Metric 'motorCarburant' value is 520% - Metric 'motorWaterTemp' value is 520C | 'motorCarburant'=520%;40:100;30:100;; 'motorOilPressure'=5.2Bar;0:7;0:8;; 'motorRpm'=520trs/min;0:1505;0:1507;; 'motorWaterTemp'=520C;55:95;50:100;; Metric 'motorCarburant' value is 520% Metric 'motorOilPressure' value is 5.20Bar Metric 'motorRpm' value is 520rpm Metric 'motorWaterTemp' value is 520C
On interface centreon :
In my settings file, I think that I might not have the right settings because my values are wrong. In your opinion, how can I register the right values ?
Thanks you for reply.
Best regard,
Hello. I also have to monitor an electrical generator using modbus but I am not clear about the meaning of the fields.
If I use address 1029 as in the originally reported case I get a similar value, 255, which I assume would be 25.5V
But I'm trying other addresses I don't get what I expect (or I don't know how to read it).
I got a table with addresses in hexadecimal from the maker but those don't work with the plugin. Am I suppossed to convert those to other format?
These are some examples of the info I got from the maker.
Address (hexadecimal)
Description
Function
Read/Write
Nº bytes
0010
Seconds:Minutes
03
R
2
0011
Hours:week day
03
R
2
0012
month_day:mes
03
R
2
0013
year:reservado
03
R
2
So, what should I use in the address. Any link that explains what is the meaning of address, quantity, display, etc?
Regards,
Emeck
Got it!
The maker gave us some missleading data and the clock was also wrongly configured.
If I use address 1029 as in the originally reported case I get a similar value, 255, which I assume would be 25.5V
if this is the generator im thinking, 1029 is battery voltage * 10, which means you can divide it using custom tools:
Yes that works for me also as expected. But that is not what I need to monitor.
I need to check addresses that return a value of 16 bits. Each bit means on/off status for an alarm or function of the generator. I have succesfully configured a check for several type of alarms we wan to monitor in Centreon using thise config:
OK: Global metrics are OK | 'AlarmasParoB1'=0;;0:0;; 'AlarmasParoB2'=0;;0:0;; 'AlarmasPreventivasB3'=0;;0:0;; 'AlarmasPreventivasB4'=0;;0:0;;
The metrics are returned in decimal but if any alarm is triggered its bit will be 1 and the metric will be greater than 0, so the check should appear as CRITICAL. I guess I have this right.
My problem is with another address I need to check. This is the config:
OK: Metric 'EstadoSistemaB7' value is '50568' - Metric 'EstadoSistemaB7' value is '50568' | 'EstadoSistemaB7'=50568;;0:50600;; 'EstadoSistemaB7'=50568;;;;
The value '50568' is '0b1100010110001000' in binary and of those 16 bits I need to check bits #9 and #10 (counting from right to left and starting in 0 por the position). Those bits are Out of Service (value 0) and Automatic Start (value 1) which is what we need.
Is it possible to convert the value I get to binary and then check those 2 bits with a virtualcurve setting?
Regards,
Enrique
Hello.
Since I didn’t find how to do it with the config file, I made a script to launch the plugin command, capture the output, extract the metric value, convert it to binary, apply a mask for the position and check the bit.
Seems to be working. At least it detected two state changes last monday.