Giter Club home page Giter Club logo

zbx_s7_get's Introduction

zbx_s7_get

Simple Zabbix python3 script, to get values from Siemens S7 PLCs using snap7 suite and python-snap7.

Install

Example for Zabbix server/proxy running on Centos 7:

  1. Download snap7 from https://sourceforge.net/projects/snap7/files/
  2. Install snap7:
7za x snap7-full-1.4.2.7z
sudo yum groupinstall 'Development Tools'
cd snap7-full-1.4.2/build/unix
make -f x86_64_linux.mk
sudo make -f x86_64_linux.mk install
sudo ldconfig
  1. Install python-snap7:

sudo python3 -m pip install python-snap7

  1. Copy s7_get.py to /usr/lib/zabbix/externalscripts/:
cp s7_get.py /usr/lib/zabbix/externalscripts
chmod +x /usr/lib/zabbix/externalscripts
  1. Test the script by running it directly from shell:
$ ./s7_get.py 172.10.1.1 0 0 66 2 int
6

Setup in Zabbix

Create new item:

  • Type: External check
  • Key: s7_get.py[<s7_ip_address>,<s7_rack>,<s7_slot>,<DB>,<offset>,<datatype>], where datatype = int,bool or float.

For example:

image

zbx_s7_get's People

Contributors

v-zhuravlev avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.