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.73.tar.gz (39.7 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.73-py3-none-any.whl (21.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for okerrsensor-0.0.73.tar.gz
Algorithm Hash digest
SHA256 e4e0145fb129e8d28b768fb8085c212eca0589001c3237dd317f568e2c9f9c1a
MD5 aa098509979d3748c9dbb0c073cab334
BLAKE2b-256 8dbc7a95923992533680f967971fa0c47b7650aadbcc2d783e96608f41f22d98

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for okerrsensor-0.0.73-py3-none-any.whl
Algorithm Hash digest
SHA256 8d623aaa2d8741451d16d8ba17d8abee2b2b453d348593ddf2bc58c0ddce0394
MD5 615a7a7596bdc1ff801d99ae3ccffc59
BLAKE2b-256 be165a2d60573dd7ba6c6113f3c5147ad6023bf117f19c34ab69a7dbff47b59d

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