Zabbix + OPC DA

In recent releases, Zabbix out of the box began to support some popular industrial equipment protocols. With support for Modbus and MQTT, its use with industrial automation systems has become a little easier. But such an approach to monitoring this kind of equipment is not always possible.





, , . OPC . Zabbix OPC DA . , .





Zabbix

Zabbix SCADA-. . , . .





OPC

, , OPC-. , . , , OpenOPC.





OpenOPC

, OPC DA, , DCOM , , Windows. OpenOPC Windows XP, OPC . opc.exe PATH.





. OPC :





C:\Users\> opc.exe -q
Merz.OPC_SAIA_S-BUS.1

C:\Users\>
      
      



- csv:





C:\Users\>opc.exe -o csv -s Merz.OPC_SAIA_S-BUS.1 ATP.Register.OAT 
ATP.Register.OAT,197,Good,05/24/21 07:16:15

C:\Users\>opc.exe -o csv -s Merz.OPC_SAIA_S-BUS.1 ATP.Register.OAT ATP5.Register.T_inlet ATP5.Register.T_outlet
ATP.Register.OAT,198,Good,05/24/21 07:16:41
ATP5.Register.T_inlet,627,Good,05/24/21 07:16:41
ATP5.Register.T_outlet,654,Good,05/24/21 07:16:41

C:\Users\>
      
      



-

opc.exe . : OPC OPC , . OPC , DCOM OPC . OPC - SCADA Zabbix - . : OpenOPC. , , , . OPC .





Zabbix

Zabbix , Windows XP, , zabbix_agent-5.2.0-windows-i386-openssl.msi. . , :





  • st name - , Zabbix .





  • Zabbix server IP/DNS - IP- Zabbix .





  • Server or Proxy for active checks - IP- Zabbix .





Zabbix

C:\Program Files\Zabbix Agent\zabbix_agentd.conf .





  1. .





    ### Option: Timeout
    #	Spend no more than Timeout seconds on processing.
    #
    # Mandatory: no
    # Range: 1-30
    # Default:
    # Timeout=3
    Timeout=30
          
          



  2. .





    #	User-defined parameter to monitor. There can be several user-defined parameters.
    #	Format: UserParameter=<key>,<shell command>
    #
    # Mandatory: no
    # Default:
    # UserParameter=
    UserParameter=opc[*],opc.exe -o csv -s $1 $2
          
          



Zabbix

Zabbix . st name, , - IP- .





c Zabbix (). : opc[< OPC >, < >].





, :





ATP2.Register.OAT,273,Good,05/24/21 15:21:33

ATP2.Register.GVS.T_inlet_W,501,Good,05/24/21 15:21:33

ATP2.Register.GVS.T_outlet_W,445,Good,05/24/21 15:21:33

ATP2.Register.T_outlet_w_com,404,Good,05/24/21 15:21:33

ATP2.Register.RAD.T_outlet_W,256,Good,05/24/21 15:21:33

ATP2.Register.P_in_W_com,39,Good,05/24/21 15:21:33

ATP2.Register.P_out_W_com,36,Good,05/24/21 15:21:33

ATP2.Register.RAD.P_outlet_W,43,Good,05/24/21 15:21:33

ATP2.Register.FIRE.P_gidrant,68,Good,05/24/21 15:21:33
      
      



, CVS, .





JavaScript, CVS, .





function (value){
    var nr_line = 4;

    var lines = value.split('\n');
    var fields = lines[nr_line].split(',');

    if(typeof fields[2] != "undefined" &&  fields[2] == "Good"){
    	return (typeof fields[1] != "undefined") ? fields[1] : null;
    }

    return null;
}
      
      



:





Now that the data from the equipment is in Zabbix, you can proceed to the further organization of monitoring: creating and processing various triggers, generating graphs, reports, etc.








All Articles