Skip to main content

network sensor for okerr monitoring server

Project description

Okerr remote network sensor

Install

PIPX_HOME=/opt/pipx PIPX_BIN_DIR=/usr/local/bin install git+https://github.com/yaroslaff/sensor/

PIPX_HOME=/opt/pipx PIPX_BIN_DIR=/usr/local/bin pipx reinstall okerrsensor

or (old way):

pip3 install git+https://github.com/yaroslaff/sensor/

configure /etc/okerrclient.conf

Prepare env config file:

root@deb10:~# cat /etc/okerr/env/sensor  
SENSOR_NAME=deb10@nsk.ru
RMQ_USER=okerr-rabbit-user
RMQ_PASS=okerr-rabbit-secret-password
RMQ_VHOST=okerr
RMQ_HOST=rabbitmq.example.com

SENSOR_IP=1.2.3.4

## only for local debugging
#SENSOR_PEM=.local/ssl/client.pem
# SENSOR_CAPEM=.local/ssl/ca.pem
export SENSOR_NAME RMQ_HOST RMQ_VHOST  RMQ_USER RMQ_PASS SENSOR_PEM SENSOR_CAPEM

Run from shell

$ cp .env-example .env
$ vim .env # Adjust settings
$ . .env
$ sudo sensor.py 
20191228 01:09:35 started sensor deb10@nsk.ru

Specify check from CLI:

./sensor.py --manual httpstatus url=https://cat.okerr.com/ status=200 options=addr=88.214.35.64

Install as systemd service

mkdir /var/log/okerr

cp /usr/local/okerrsensor/okerr-sensor.service /etc/systemd/system/
systemctl daemon-reload
systemctl enable okerr-sensor
systemctl start okerr-sensor

Run on low-memory machines

Use --oneprocess option, or set env variable SENSOR_ONEPROCESS to any non-empty value (e.g. in /etc/okerr/env/sensor)

Build dist from source

git clone git@github.com:yaroslaff/sensor.git
python3 setup.py bdist_wheel

Other okerr resources

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

okerrsensor-0.0.70.tar.gz (39.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

okerrsensor-0.0.70-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

Details for the file okerrsensor-0.0.70.tar.gz.

File metadata

  • Download URL: okerrsensor-0.0.70.tar.gz
  • Upload date:
  • Size: 39.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for okerrsensor-0.0.70.tar.gz
Algorithm Hash digest
SHA256 73bda47ef612dd14f7653f8f06c2b592e950ea6b4603f5446cc600f4794bd1c0
MD5 a9a3d7603ce1e4430f3ccfb344e03d84
BLAKE2b-256 9ee937e00dea2987c527375a0476add759fa84c418165c9964f257a68158114d

See more details on using hashes here.

File details

Details for the file okerrsensor-0.0.70-py3-none-any.whl.

File metadata

  • Download URL: okerrsensor-0.0.70-py3-none-any.whl
  • Upload date:
  • Size: 20.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for okerrsensor-0.0.70-py3-none-any.whl
Algorithm Hash digest
SHA256 d73ce862a0768b5d5c3e3b4d0af12e624e06ad1e5afdd2f307f2b2b5bf7e6614
MD5 a965c4ff05775e071debfae282b119a5
BLAKE2b-256 52c2d54e0a6a5ab54909761e856c643180d9cba46f431ac6917eecdf5b4055e6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page