All Projects → coussej → Node Opcua Logger

coussej / Node Opcua Logger

Licence: mit
An OPCUA Client for logging data to InfluxDB! 🔌 🏭

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Node Opcua Logger

Timeseriesadmin
Administration panel and querying interface for InfluxDB databases. (Electron app / Docker container)
Stars: ✭ 107 (-22.46%)
Mutual labels:  influxdb
Datax
DataX is an open source universal ETL tool that support Cassandra, ClickHouse, DBF, Hive, InfluxDB, Kudu, MySQL, Oracle, Presto(Trino), PostgreSQL, SQL Server
Stars: ✭ 116 (-15.94%)
Mutual labels:  influxdb
Grafana Influx Dashboard
Grafana InfluxDB scripted dashboard
Stars: ✭ 130 (-5.8%)
Mutual labels:  influxdb
Grafana
The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
Stars: ✭ 45,930 (+33182.61%)
Mutual labels:  influxdb
Influxdb Python
Python client for InfluxDB
Stars: ✭ 1,559 (+1029.71%)
Mutual labels:  influxdb
Icinga2
Icinga is a monitoring system which checks the availability of your network resources, notifies users of outages, and generates performance data for reporting.
Stars: ✭ 1,670 (+1110.14%)
Mutual labels:  influxdb
Iotstack
docker stack for getting started on IOT on the Raspberry PI
Stars: ✭ 1,383 (+902.17%)
Mutual labels:  influxdb
Go Recipes
Code examples for the book "Go Recipes" by Apress.
Stars: ✭ 135 (-2.17%)
Mutual labels:  influxdb
Influxer
InfluxDB ActiveRecord-style
Stars: ✭ 115 (-16.67%)
Mutual labels:  influxdb
Influxdb Client Csharp
InfluxDB 2.0 C# Client
Stars: ✭ 130 (-5.8%)
Mutual labels:  influxdb
Haproxy Configs
80+ HAProxy Configs for Hadoop, Big Data, NoSQL, Docker, Elasticsearch, SolrCloud, HBase, MySQL, PostgreSQL, Apache Drill, Hive, Presto, Impala, Hue, ZooKeeper, SSH, RabbitMQ, Redis, Riak, Cloudera, OpenTSDB, InfluxDB, Prometheus, Kibana, Graphite, Rancher etc.
Stars: ✭ 106 (-23.19%)
Mutual labels:  influxdb
Iot Technical Guide
🐝 IoT Technical Guide --- 从零搭建高性能物联网平台及物联网解决方案和Thingsboard源码分析 ✨ ✨ ✨ (IoT Platform, SaaS, MQTT, CoAP, HTTP, Modbus, OPC, WebSocket, 物模型,Protobuf, PostgreSQL, MongoDB, Spring Security, OAuth2, RuleEngine, Kafka, Docker)
Stars: ✭ 2,334 (+1591.3%)
Mutual labels:  opc-ua
Pi Hole Influx
A python daemon to send Pi-Hole stats for Grafana to InfluxDB
Stars: ✭ 126 (-8.7%)
Mutual labels:  influxdb
Flink Learning
flink learning blog. http://www.54tianzhisheng.cn/ 含 Flink 入门、概念、原理、实战、性能调优、源码解析等内容。涉及 Flink Connector、Metrics、Library、DataStream API、Table API & SQL 等内容的学习案例,还有 Flink 落地应用的大型项目案例(PVUV、日志存储、百亿数据实时去重、监控告警)分享。欢迎大家支持我的专栏《大数据实时计算引擎 Flink 实战与性能优化》
Stars: ✭ 11,378 (+8144.93%)
Mutual labels:  influxdb
Docker Influxdb Grafana
A Docker container which runs InfluxDB and Grafana ready for persisting data
Stars: ✭ 130 (-5.8%)
Mutual labels:  influxdb
Opc Ua Ooi
Object Oriented Internet - C# deliverables supporting a new Machine To Machine (M2M) communication architecture
Stars: ✭ 104 (-24.64%)
Mutual labels:  opc-ua
Influxdb Ui
🐎 A simple UI for InfluxDB
Stars: ✭ 117 (-15.22%)
Mutual labels:  influxdb
Quicklogger
Library for logging on files, console, memory, email, rest, eventlog, syslog, slack, telegram, redis, logstash, elasticsearch, influxdb, graylog, Sentry, Twilio, ide debug messages and throw events for Delphi/Firemonkey/freepascal/.NET (Windows/Linux/OSX/IOS/Android).
Stars: ✭ 137 (-0.72%)
Mutual labels:  influxdb
Gpu monitor
Monitor your GPUs whether they are on a single computer or in a cluster
Stars: ✭ 133 (-3.62%)
Mutual labels:  influxdb
Mrpc
🐿 netty,zookeeper,spring,kyro rpc framework.
Stars: ✭ 128 (-7.25%)
Mutual labels:  influxdb

Influx-OPCUA-logger: An OPCUA Client for logging data to InfluxDB! 🔌 🏭

This application will connect to an OPC UA server, subscribe to the metrics in your configuration and log them to an influxdb instance. It also buffers the data in case influxdb is temporarily unavailable, your data is not lost. Has been running in production in several factories since mid 2016.

Brought to you by Factry.

JavaScript Style Guide

ℹ️ This is an alpha release of v2. Please go ahead and try it out, you can contribute by opening issues if you find any bugs!

Features

  • Connect to any OPCUA compatible datasource.
  • Support for both polled and monitored logging of values.
  • Logs numbers, booleans and strings. For booleans, the value is recorded as a boolean, but a field value_num is added containing 1/0 depending on the value.
  • Internal buffering mechanism to avoid data loss when connection to InfluxDB is lost.
  • Deploy as a single binary, no need to install dependencies on host system.
  • Cross-platform: binaries available for both windows, linux and mac.

How to run

From a prebuilt binary

  • Download a binary for your OS in the release section of this repo.
  • Create a config.toml of config.json file (see configuration).
  • Data!

From source

  • Install the latest version of NodeJS v10 on you system.
  • Clone this repository.
  • Run npm install in the project root.
  • Create a config.toml of config.json file (see configuration).
  • Run npm run start.
  • Data!

Configuration

Environment variables

The following settings are optional and controlled by setting environment variables.

  • CONFIG_FILE: path to the config file (see below). This defaults to ./config.toml
  • LOG_FILE: when set, the application will also log to this file instead of only to stdout.
  • LOG_FILE_DAYS: number of days to keep logfiles. Defaults to 10.
  • DATA_PATH: a directory path in which to store the buffer files. By default, a ./data folder will be created in the current working directory

Config file

The application expects a config file that contains all the details on which data you want to log. This can either be a TOML or a JSON file, whichever you prefer. The application will look for such a file in the current working directory on startup, unless you specifically specify a seperate path in the environment. The contents of the file will be validated against the JSON Schema in the src/schema folder. For reference, two example config files are provided in the example_config folder.

A config file consists of 2 sections. In the first part, you specify the connection details to both the OPCUA server and the InfluxDB server:

# The OPCUA connection parameters. If you want to use anonymous auth, 
# remove the username and password lines.
[opcua]
url             = "opc.tcp://localhost:53530/OPCUA/SimulationServer"
user            = "test"
pass            = "test1"

# The InfluxDB connection parameters. Use a connection url containing all 
# details, ie. http(s)://user:[email protected]:port/database
[influx]
url              = "http://user:[email protected]:8086/opcua"
writeInterval    = 1000          # optional. defaults to 1000ms
writeMaxPoints   = 1000          # optional. defaults to 1000 points

In the second part, you specify which metrics to collect. For each such metric, you can specify an objects in the [[metrics]] list, like below. A metric should have the following properties:

  • measurement: the name under which the values of this metrics should be stored in InfluxDB
  • datatype: the datatype of the values. This is either number, boolean or string.
  • tags: a list of metadata tags to be stored in InfluxDB. The collector will automatically add a tag with the OPCUA status of each datavalue.
  • nodeId: the nodeId of the datavalue in the OPCUA Server.
  • method: how this metric should be collected. There are 2 possibilities:
    • polled: collect the value of the metric at regular intervals, for example each second. The resulting datapoint will get the timestamp at which the poll was initiated.
    • monitored: subscribe to the value in the OPCUA server, and receive it's value when it has changed. This is mostly used for boolean data (like valve positions) or string data (like batchnumbers).
    • interval: the data collection interval in milliseconds. Currently, only second level intervals are supported, and they are rounded so they match a 1 minute cycle. For example 1000ms will stay as such, 9000 ms will be rounded to 10000ms, 25000ms will be rounded tot 30000ms.
# For each metrics you want to collect, add a [[metrics]] object.
[[metrics]]
measurement        = "polled1"
datatype           = "number"
tags               = { simulation = "true", location = "ghent" }
nodeId             = "ns=5;s=Sinusoid1"
method             = "polled"
interval           = 1000     

[[metrics]]
measurement        = "monitored2"
datatype           = "boolean"
tags               = { simulation = "true", location = "ghent" }
nodeId             = "ns=3;s=BooleanDataItem"
method             = "monitored"
interval           = 5000  

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request

Credits

Disclaimer

The logger contains a 'phone home' functionality, where it sends anonymous usage data to us (# metrics and runtime), so we can get an idea of how much it is being used. If you don't want this, you can set DISABLE_ANALYTICS=true in the environment.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].