MonitoringFS

Remote Monitoring Filesystem

Short description

MonitoringFS is a FUSE-based remote monitoring filesystem. It was formerly known as NagiosFS. Requests are done with UDP and the remote UDP server is extremely fast. A typical "cat" of one of the files in MonitoringFS takes about one millisecond.

MonitoringFS is contained in the ngtx-package. This package contains prebuilt Linux binaries (statically linked) to offer simple and fast exploration of the tools.

More information about MonitoringFS is coming soon. Meanwhile please visit http://www.tuxad.de/monitoringfs.html

Example usage

"Client" side "Server" side
$ wget -q http://www.nagiosfs.de/ngtx.tgz
$ tar xzf ngtx.tgz 
$ cd ngtx-20*

$ mkdir mnt
$ echo "localhost 127.0.0.1"|nagiosfs/nagiosfs -o direct_io mnt/
nagiosfs_hosts_count = 1, nagiosfs_keys_count = 22

$ ls -l mnt/
total 0
dr-xr-xr-x. 6 root root 0 2011-08-13 00:11 localhost
$ ls -l mnt/localhost/
total 0
dr-xr-xr-x. 3 root root 0 2011-08-13 00:11 cat
-r--r--r--. 1 root root 0 2011-08-13 00:11 cpui
-r--r--r--. 1 root root 0 2011-08-13 00:11 cpuI
-r--r--r--. 1 root root 0 2011-08-13 00:11 cpus
-r--r--r--. 1 root root 0 2011-08-13 00:11 cpuu
-r--r--r--. 1 root root 0 2011-08-13 00:11 cpuw
-r--r--r--. 1 root root 0 2011-08-13 00:11 ctxtswitch
dr-xr-xr-x. 3 root root 0 2011-08-13 00:11 diskusage
-r--r--r--. 1 root root 0 2011-08-13 00:11 load1
-r--r--r--. 1 root root 0 2011-08-13 00:11 load15
-r--r--r--. 1 root root 0 2011-08-13 00:11 load5
dr-xr-xr-x. 4 root root 0 2011-08-13 00:11 loaduser
-r--r--r--. 1 root root 0 2011-08-13 00:11 mailqsize
-r--r--r--. 1 root root 0 2011-08-13 00:11 nettraf0
-r--r--r--. 1 root root 0 2011-08-13 00:11 nettraf1
-r--r--r--. 1 root root 0 2011-08-13 00:11 proccount
-r--r--r--. 1 root root 0 2011-08-13 00:11 proccounttg
-r--r--r--. 1 root root 0 2011-08-13 00:11 swaps
dr-xr-xr-x. 2 root root 0 2011-08-13 00:11 timediff
-r--r--r--. 1 root root 0 2011-08-13 00:11 uptime
$ cat mnt/localhost/load1
0.03
$ cat mnt/localhost/cat/proc/loadavg 
0.03 0.05 0.03 1/267 17702
$ cat mnt/localhost/cat/proc/sys/kernel/hostname 
fukato.localdomain
$ 
$ wget -q http://www.nagiosfs.de/ngtx.tgz
$ tar xzf ngtx.tgz 
$ cd ngtx-20*
$ knoerre/knoerred 8888 127.0.0.1

all hosts of nagios-server

$ tools/nagios-show-addresses </var/cache/nagios3/objects.cache|nagiosfs/nagiosfs -o direct_io /nagiosfs
nagiosfs_hosts_count = 2827, nagiosfs_keys_count = 5
$ ls -l /nagiosfs/|tail    
dr-xr-xr-x 2 root root 0 Aug 13 09:10 vm56
dr-xr-xr-x 2 root root 0 Aug 13 09:10 vm57
dr-xr-xr-x 2 root root 0 Aug 13 09:10 vm58
dr-xr-xr-x 2 root root 0 Aug 13 09:10 vm59
dr-xr-xr-x 2 root root 0 Aug 13 09:10 vm60
dr-xr-xr-x 2 root root 0 Aug 13 09:10 vm61
dr-xr-xr-x 2 root root 0 Aug 13 09:10 vm63
dr-xr-xr-x 2 root root 0 Aug 13 09:10 vm64
dr-xr-xr-x 2 root root 0 Aug 13 09:10 vpn16101
dr-xr-xr-x 2 root root 0 Aug 13 09:10 vpn2005

all hosts of nagios-server, custom list of service-checks

$ { tools/nagios-show-addresses </var/cache/nagios3/objects.cache; cat ../service-checks3; } | nagiosfs/nagiosfs -o direct_io /nagiosfs
nagiosfs_hosts_count = 2812, nagiosfs_keys_count = 13
$ find /nagiosfs/w302/ \! -type d/nagiosfs/w302/cat/nagios-cache/allsmart
/nagiosfs/w302/cat/nagios-cache/fsckage
/nagiosfs/w302/cmdline/usr/lib/postfix/master
/nagiosfs/w302/diskinodes/home/www
/nagiosfs/w302/diskusage/home/www
/nagiosfs/w302/kernellog/06/var/log/messages
/nagiosfs/w302/load1
/nagiosfs/w302/loaduser/10000/2000000
/nagiosfs/w302/mailqsize/admiM
/nagiosfs/w302/proccount
/nagiosfs/w302/proccounttg
/nagiosfs/w302/process/syslog-ng
/nagiosfs/w302/swaps
$ cat /nagiosfs/w302/cat/nagios-cache/fsckage
146
$ cat /nagiosfs/w302/diskusage/home/www
30
$ cat /nagiosfs/w302/kernellog/06/var/log/messages
TIMEOUT
$ cat /nagiosfs/w302/mailqsize/admiM
TIMEOUT
$ cat /nagiosfs/w302/process/syslog-ng
1
$ cat /nagiosfs/mail01/mailqsize/admiM
2

Overview

A diagram of ngtx and MonitoringFS usage shows this PNG-image.

Slides

Slides of OpenRheinRuhr 2011: www.tuxad.de/vortragsfolien.html

More information

More information about MonitoringFS, the fast remote monitoring filesystem, is coming soon. Meanwhile please visit http://www.tuxad.de/monitoringfs.html

(Built on Debian, tested on Fedora.)