Package: okerrupdate
okerrupdate - client-side okerr module and utilitiesInstallation# newer method with pipxsudopipxinstallokerrupdate# old method with pip3, if you cannot install pipxsudopip3installokerrupdate


sudookerrmod--init# enable few basic modules, create /etc/cron.d/ job, create okerrupdate config templatesudovim/etc/okerr/okerrupdateand modify okerrupdate file:# Stub for okerrmod            
PREFIX=braconnier:
OKERR_TEXTID=
OKERR_SECRET=
OKERR_URL=
OKERR_DIRECT=0

OKERR_MOD_AVAIL=or provide values tookerrmod --initas option values (e.g.okerrmod --init --textid MyTextid).Basic usageokerrupdate utilityokerrupdate is small script which updates/creates indicators in okerr project.This will create simplest indicator 'myindicator' with all default settings (type 'heartbeat', policy 'Default').
Indicator will send alert if it will be updated to 'ERR' or if will not be updated for some time
(Default policy period+patience).$okerrupdatemyindicatorOK
okerrupdated(200OK)myindicator@okerr=OKThis will create numerical indicator 'temp' with current value 36.6, and policy 'Daily'. Will send alert if not updated
for a day or if value will be over maxlim (37).$okerrupdate-pDaily-m'numerical|maxlim=37'temp36.6
okerrupdated(200OK)temp@okerr=36.6Project TextID and secret is read from/etc/okerr/okerrupdatefile orOKERR_TEXTIDandOKERR_SECRETenvironment
variables.okerrmod utilityokerrmod is script to perform different local checks (such as free disk space, mysql running, load average, etc.). After initialokerrmod --init, few basic check modules
are enabled.List all available check modules (+- module enabled,-- module disabled ):$okerrmod--list
+backups0.1Checkfreshnessforbackupfiles
+df0.1Freediskspace
...To run enabled checks just runokerrmodwithout any other commands:xenon@braconnier:~$sudookerrmodokerrupdated(200OK)braconnier:maxfilesz@okerr=9077814okerrupdated(200OK)braconnier:apache@okerr=0okerrupdated(200OK)braconnier:nonempty@okerr=0okerrupdated(200OK)braconnier:empty@okerr=0...To run just one check:$sudookerrmod--runok
okerrupdated(200OK)braconnier:ok@okerr=OKTo enable new check:$sudookerrmod--enablerunstatus2020/01/1716:12:30enable/usr/local/lib/python3.7/dist-packages/okerrupdate/mods-available/runstatus2020/01/1716:12:30makedefaultconfigfile:/etc/okerr/mods-env/runstatusAfter this, you may want to edit default configuration for this checksudovim/etc/okerr/mods-env/runstatusAfter this,okerrmodwill run this check.To create your own very basic check 'my' create dir/etc/okerr/mods-available/myand edit/etc/okerr/mods-available/my/check:#!/usr/bin/python3print("STATUS: OK")or if you prefer shell (check is any executable file):#!/bin/shechoSTATUS:OKNow you can run it manuallyokerrmod --run my, enableokerrmod --enable my, make/edit config file for it/etc/okerr/mods-env/my.Using okerrupdate python librarySimplest case:#!/usr/bin/pythonimportokerrupdateop=okerrupdate.OkerrProject('MyTextID',secret='MySecret')i=op.indicator('temp',method='numerical|maxlim=37',policy='Daily')i.update('36.6')DocumentationMore info inokerrupdate documentation.Other okerr resourcesOkerr main websiteOkerr-server source code repositoryOkerr client (okerrupdate) repositotyandokerrupdate documentationOkerrbench network server benchmarkOkerr custom status pageOkerr JS-powered static status pageOkerr network sensor