Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iboard/system_monitor
Monitor your Unix-System with RAKE-tasks and through the webinteface
https://github.com/iboard/system_monitor
Last synced: 16 days ago
JSON representation
Monitor your Unix-System with RAKE-tasks and through the webinteface
- Host: GitHub
- URL: https://github.com/iboard/system_monitor
- Owner: iboard
- Created: 2009-11-01T18:19:22.000Z (about 15 years ago)
- Default Branch: master
- Last Pushed: 2009-11-05T07:45:59.000Z (about 15 years ago)
- Last Synced: 2024-12-12T10:48:48.405Z (22 days ago)
- Language: Ruby
- Homepage: http://ib4.iboard.cc/postings/31
- Size: 176 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
== How SystemMonitor works
# Install SystemMonitor from GitHub http://github.com/iboard or
Clone-URL http://git.iboard.cc/git/system_monitor/
git clone http://git.iboard.cc/git/system_monitor/
--or--
git clone git://github.com/iboard/system_monitor.git
# Edit config/environment.rb and define your monitors and asserts like shown below
# Edit config/environments/production.rb, development.rb - see sample.rb-files
# Make sure your server can access the remote hosts through ssh with ssh-keys without password
# Start the server with script/server and call http://yourserver:yourport/== Definitions
Edit your _environment.rb_ and add your definitions there...
== SystemMonitor
remotehost, name, command, parameters
_command_ will be executed by ssh using _remotehost_.
The output of this ssh-request will be displayed== RemoteAssert
remotehost, name, command, word, assert
_ssh remotehost command_ will be execuded.
The output will be split by 'spaces' and word number word will be returned as value. (first word is 0).
This _value_ will be used as FLOAT,INTEGER,STRING in the assert-command.== Examples
environment.rb:
MY_MONITORS=[
SystemMonitor::SysMonitor.new('[email protected]', 'Disk usage YourServer', 'df', '-h|grep sd'),
SystemMonitor::SysMonitor.new('[email protected]', 'Syslod YourServer', 'uptime', ''),
SystemMonitor::SysMonitor.new('[email protected]', 'Mailqueue YourServer', 'mailq', '|tail -1')
]REMOTE_ASSERTS=[
SystemMonitor::RemoteAssert.new('[email protected]', 'Root partition usage YourServer',
'df|grep "/dev/sda2"', 4, 'INTEGER < 80 && STRING != ""',
'[email protected]','Monitoring ALERT detected'),
SystemMonitor::RemoteAssert.new('[email protected]', 'Root partition usage other server',
'df|grep "/dev/md2"', 4, 'INTEGER < 80 && STRING != ""',
'[email protected]','Monitoring ALERT detect)
]/etc/inittab:
M1:23:respawn:su - rails_user -c "/path/to/system_monitor/bin/cron_system_monitor.sh -e production"