-N, -no-network: Disable network listening socket (if enabled in config).-p PIDFILE, -pidfile=PIDFILE: Write PID into this file.-f CONFIG, -config=CONFIG: configuration file (monitor.ini).I am not a Windows user so cannot offer advice on correctly setting this up. You will need to adjust paths, usernames and options before using them! If you want to run it as a Windows Service, you want winmonitor.exe. In the scripts folder you can find startup scripts for various systems. See Configuration.Īssuming your $PATH covers where pip installs things, you can just run simplemonitor. You may also want to check out pipx which lets you easily install tools in their own virtualenv. I quite like pyenv for installing different versions of Python, instead of using the system package manager. (Ubuntu 20.04 users may find this page helpful for setting up Python 3.) If you want to be able to query the Ring API for your doorbell battery level, use simplemonitor pip install simplemonitor or pip install -user simplemonitor.Make sure that the pip you use in the command below is the one for Python 3. You may need to install something like python3-pip with your package manager to get the right version installed. SimpleMonitor requires Python >= 3.6.2 (check with python -V). Remote monitors: An instance running on a remote machine can send its results back to a central instance for logging and alerting.(For example, I don’t want to be woken up overnight by an SMS, but if something’s still broken I’d like an SMS at 7am as I’m getting up.) Alert catchup: …and also to alert you to a monitor which failed when they were unable to tell you.Alert periods: Alerters can be configured to only alert during certain times and/or on certain days….Monitors can be given a gap between polls so that they only poll once a day (for example). Monitor gaps: By default every monitor polls every interval (e.g.Per-host monitors: Define a monitor which should only run on a particular host and all other hosts will ignore it – so you can share one configuration file between all your hosts.Urgency: Monitors can be defined as non-urgent so that urgent alerting methods (like SMS) are not wasted on them.Escalation of alerts: Alerters can be configured to require a monitor to fail a number of times in a row (after its tolerance limit) before they fire, so alerts can be sent to additional addresses or people.Tolerance: Monitors checking things the other side of unreliable links or which have many transient failures can be configured to require their test to fail a number of times in a row before they report a problem.If a monitor fails, its dependencies will be skipped until it succeeds. Dependencies: Monitors can be declared as depending on the success of others.Simple configuration file format: it’s a standard INI file for the overall configuration and another for the monitor definitions.Executing arbitary commands on monitor failure and recoveryĪgain, adding more logging/alerting methods is simply a case of writing some Python.Posting notifications to Slack, 46elks, Notify My Android, Pushbullet, and Pushover.Writing an entry to the syslog (non-Windows only).Sending a text message via BulkSMS (subscription required).Writing a log file of all successes and failures, or just failures.Sending an email alert when a monitor fails, and when it recovers, directly over SMTP or via Amazon SES.Maintaining a snapshot of the current state of the monitors in a SQLite database.Writing the state of each monitor at each iteration to a SQLite database (i.e.A monitor which is a compound of a number of the aboveĪdding more monitor types is quite simple if you are able to code in Python.Running an arbitrary command and checking the output.APC UPS monitoring (requires apcupsd to be installed and configured).Service monitoring: FreeBSD ‘rc’ (and potenially others), Windows services, daemontools service.HTTP monitoring (is a URL fetchable without error? Optionally, does the page content it match a regular expression?).TCP monitoring (is a host listening on a TCP port?).Remote monitor instances can send their results back to a central location. It is designed to be quick and easy to set up and lacks complex features that can make things like Nagios, OpenNMS and Zenoss overkill for a small business or home network. SimpleMonitor is a Python script which monitors hosts and network connectivity.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |