ngtx
====

ngtx contains some tools primarily written to make
sysadmin's daily work more easy (most of them are written to
be used in bash scripts) and some tools mainly for nagios
monitoring purposes.
License is GPL v2.

Get ngtx from http://www.tuxad.de/

Some man pages are included. For more information please
take a look at the sources. Actually much stuff here is
written for educational purposes.

For knoerre (nagios remote check http-server) you need at
least DJB's tcpserver from the ucspi-tcp software suite
(http://cr.yp.to/ucspi-tcp.html). The usage of daemontools
(http://cr.yp.to/daemontools.html) is strongly recommended.
Only the brave among yourselves will have the heart
to do the daring deed of using (x)inetd.

Just do
   make && make install

By default (with installed dietlibc) all binaries will be
built statically linked.

If you don't have installed dietlibc (www.fefe.de) then
please use
   make DIET="" && make install

Configurable settings can be changed by running
   make menuconfig


Tools Overview
--------------

actionwhenfileold      execute a command if a file gets too old
check-nfs              test if a NFS dir is mounted (true unblocking)
chownu                 change file ownership without having root permissions
chrootuser             run a command chrooted as given user
daemonize              make a script/prog a daemon
direntries             fast manage files in a directory
dirscan                handle files dropped in a directory
ftsm                   simple file timestamp manager for git and more
griller                kill user processes if process age or load raises
killwebprocs           fast kill all "webprocs"
lkill                  fast kill all procs of a user
lps                    lightweight ps for usage in scripts
msleep250              sleep 250 ms, one of the ASM demo files
nts2hrf                convert nagios timestamp to human readable format
postfix-mailqsize      show postfix mailqueue size
postfix-saslusernames  show/count usernames of mails in queue
sfgrep                 simple grep, on i386/diet much faster than BM alg GNU grep
showip                 show ip address by querying ns1.tuxad.net
testcgi                a very simple CGI test
user-wrapper           run a program as a different user by setgid bit set


Writing a new "check" for knoerre
---------------------------------

1) create a new file like knoerre/do_check_dummy.c containing a function like:
      void do_check_dummy()
Edit the kconfig lines the key string and more. Update .config.auto for
kconfig autoconfig.

2) put the prototype in knoerre/knoerre.h:
      void do_check_dummy();
(optionally: edit BASE_VERSION in this file)

3) add a call to the new function in main() of knoerre/knoerre.c like
      #ifdef DUMMY_KEY
        if (!strncmp(request_string, DUMMY_KEY, sizeof(DUMMY_KEY))) {
          do_check_dummy();
        }
      #endif
(optionally: add a note to the change history in the first comment)

4) in Makefile add the object file to the list of KNOERREOBJS

5) Update knoerre.1 man page

6) compile: make clean all

7) test it: knoerre/knoerre dummy


Frank Bergmann, http://www.tuxad.com

$Id: README 691 2017-06-04 23:12:04Z fwbergm $
