The vwatchd daemon collects process and system information from the local host. This information includes:
- System information (CPUs, network interfaces, disks, mount points, etc.)
- CPU metrics (e.g. cache misses, NUMA memory fetch, context switches, etc.)
- OS information (running processes, disk IO, scheduler stats, etc.)
- Process information (NUMA maps, memory mappings, open files, sockets, etc.)
- Process traces (e.g. function hooks, buffers, signals, etc.)
This information is saved to disk to satisfy future queries for the state of the host as it existed at any point (or range) in time.
This project uses the CMake build system. To configure and build virtualeyes:
$ cd vwatchd/build/
$ cmake ../
$ make
At this point you can launch ./src/vwatchd
To install: (optional)
$ make install
To build and run the unit tests: (optional)
$ make test
To build a redistributable dmg/rpm/deb package: (optional)
$ make package
- MongoDB C++ Driver (v2.0+)
- Boost Libraries (1.4.1+) (required for mongo)
- libptrace
Prototype. Give it time.
After building and installing vwatchd, simply start the daemon (via upstart, launchd, or just run ./vwatchd). To configure a remote host or custom file path, simply edit /etc/vwatchd.conf. Once startd, vwatchd will write to the specified file or host (default is /vwatchd.db).
TODO:
- attach to a running process
- start a process
- add/remove/list probes
To connect a node to an existing cluster, simply add a remote-host entry for any existing node to the config file. This node will operate as part of that cluster.
Use the virtualeyes application to analyze a cluster, host, process, etc. Eventually, data may be collected from a console using a query or scripting language (e.g. lua, javascript, SQL or a DSL).
TODO: either a JSON file w/ inotify, or a syntax like:
- show alerts
- add group admins user1@email, user2@email, ...
- add alert on [event x|threshold y|observation z] from [host |any host] for [user@email|310-555-1212|admins]
TODO:
- Process ...
- System ...
Cluster-wide configuration parameters are automatically replicated, and can be modified at any time by updating '/etc/vwatchd.cluster.json' in your favorite editor. Changes will be applied and replicated any time this file is saved.
- Avoid RTTI
- Avoid Exceptions (see the Status class)
- Keep names short, but never sacrifice meaning
- Classes, namespaces, functions and variables should be lower case and use '_' to seperate words (e.g. some_var)
- Member variables have trailing underscores (e.g. some_member_var_)
- Prefer constants and enums over MACROS
- Comment .hpp files to describe intent
- Be Consistent