Commit b83eaec0 authored by Ivan Tyagov's avatar Ivan Tyagov

Add needed files for Wendelin learning track.

parent 61082237
Pipeline #37538 failed with stage
in 0 seconds
<?xml version="1.0" encoding="utf-8" ?>
<instance>
<parameter id="conf-text">
&lt;source&gt;
@type forward
port 24224
bind <IPv4>
&lt;/source&gt;
&lt;match *.temp&gt;
@type wendelin
streamtool_uri https://softinst<INSTANCE_ID>.host.vifib.net/erp5/portal_ingestion_policies/default
user zope
password <PASSWORD>
&lt;buffer&gt;
flush_mode interval
@type file
path fluentd-temp-buffer-file/
flush_interval 5s
&lt;/buffer&gt;
&lt;/match&gt;
</parameter>
</instance>
<?xml version='1.0' encoding='utf-8'?>
<instance>
<parameter id="conf-text">
&lt;source&gt;
@type exec
tag sensor1.temp
command python3 /srv/slapgrid/kbme280-sim.py
run_interval 30s
&lt;parse&gt;
keys pressure, humidity, temperature
&lt;/parse&gt;
&lt;/source&gt;
&lt;match *.temp&gt;
@type forward
&lt;server&gt;
name fluentd-gw
host <IPv4>
port 24224
&lt;/server&gt;
&lt;/match&gt;
</parameter>
</instance>
#!/usr/bin/python3
# simulate bme280 from https://wendelin.nexedi.com/wendelin-Tutorial.Setup.Fluentd.on.Sensor
from random import gauss as g
Pm, Ps = 760, 30
Hm, Hs = 80, 5
Tm, Ts = 20, 2
print('%.1f\t%.1f\t%.1f' % (g(Pm,Ps), g(Hm,Hs), g(Tm,Ts)))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment