11.event
Install event service
- Install the dependencies:
shell cd /opt/rbt/server/services/event && \ npm install -
Create and edit config file.
- copy default config:
shell cp ./config.sample.json ./config.json - set rbt internal api endpoint
- set clickhouse http interface
- copy default config:
-
Make sure the "syslog_servers" section of the server configuration contains the external IP addresses of your syslog servers:
shell jq '.syslog_servers' /opt/rbt/server/config/config.jsonThese IP addresses will be used by the devices and must be accessible from the device network. - Add user for run "Event" service:
shell groupadd rbt && \ useradd -g rbt -s /bin/true -d /dev/null rbt -
Config logrotate. Optional for local log storage:
shell ln -sf /opt/rbt/install/logrotate/event /etc/logrotate.d/eventCreate directory for logs files:shell mkdir -p /var/log/event_service/ -
Add systemd services by used intercom model: ###### Beward
shell ln -sf /opt/rbt/install/systemd/event/event_beward.service \ /etc/systemd/system/event_beward.service
###### Beward, only model DS
shell
ln -sf /opt/rbt/install/systemd/event/event_beward_ds.service \
/etc/systemd/system/event_beward_ds.service
###### Qtech
shell
ln -sf /opt/rbt/install/systemd/event/event_qtech.service \
/etc/systemd/system/event_qtech.service
###### Intersvyaz (Sokol)
shell
ln -sf /opt/rbt/install/systemd/event/event_is.service \
/etc/systemd/system/event_is.service
###### Akuvox, Omny
shell
ln -sf /opt/rbt/install/systemd/event/event_akuvox.service \
/etc/systemd/system/event_akuvox.service
⚠️
Some intercoms (Akuvox S532, OMNY VDP-10L) do not support configuring the syslog port. They always send logs to the default port 514. You need to set up a redirection of logs from port 514 to the port that the event service process is listening on (45455 by default).
You must configure the firewall used on your server. Example nftables configuration:
nftables table ip nat { chain prerouting { type nat hook prerouting priority dstnat; policy accept; udp dport 514 redirect to :45455 } }Validate and apply
/etc/nftables.conf:
shell nft -c -f /etc/nftables.conf systemctl enable --now nftables systemctl reload nftables
###### Sputnik Cloud
shell
ln -sf /opt/rbt/install/systemd/event/event_sputnik_cloud.service \
/etc/systemd/system/event_sputnik_cloud.service
###### Rubetek
shell
ln -sf /opt/rbt/install/systemd/event/event_rubetek.service \
/etc/systemd/system/event_rubetek.service
###### Ufanet
shell
ln -sf /opt/rbt/install/systemd/event/event_ufanet.service \
/etc/systemd/system/event_ufanet.service
###### Ufanet Secret Mini
shell
ln -sf /opt/rbt/install/systemd/event/event_ufanet_mini.service \
/etc/systemd/system/event_ufanet_mini.service
###### BasIP
shell
ln -sf /opt/rbt/install/systemd/event/event_basip.service \
/etc/systemd/system/event_basip.service
###### Brovotech
shell
ln -sf /opt/rbt/install/systemd/event/event_brovotech.service \
/etc/systemd/system/event_brovotech.service
###### iFLOW
shell
ln -sf /opt/rbt/install/systemd/event/event_iflow.service \
/etc/systemd/system/event_iflow.service
-
Run created systemd services:
-
reload systemctl daemon:
shell systemctl daemon-reload -
enable all new event services:
shell cd /etc/systemd/system && systemctl enable event_* --now -
or start per service: ```shell systemctl enable event_beward.service --now
-
systemctl enable event_beward_ds.service --now
systemctl enable event_qtech.service --now
systemctl enable event_is.service --now
systemctl enable event_akuvox.service --now
systemctl enable event_sputnik_cloud.service --now
systemctl enable event_rubetek.service --now
systemctl enable event_ufanet.service --now
systemctl enable event_ufanet_mini.service --now
systemctl enable event_basip.service --now
systemctl enable event_brovotech.service --now
systemctl enable event_iflow.service --now ```