Où sommes nous ?

Retour

Domestik client installation guide

This page describe step by step how to do a basic installation of Domestik server.

Lua installation

Lua is a lightweight, versatile and portage language. Having a very small footprint, it was the ideal language for writing Domestik's client.

Installing and configuring Lua is clearly out of the scope of this documentation. Have a look on your own OS documentation or here for Gentoo (in French).

Some modules are required :

If they are not packaged for your OS, you can install them manually using luarocks :

luarocks install luasocket

Create dedicated user

For security reason, create a dedicated user with reduced rights

useradd --comment "Domestik's user" --gid nogroup --system --no-user-group --shell /sbin/nologin --home-dir /dev/null domestik

Install Domestik bundle

Dowload the tarball from Sourceforge and install in in /usr/local (it will create /usr/local/Domestik).
Alternatively, you may use an SVN snapshot.

Configuring probes

Tip

Central client configuration

When Domestik daemon is starting, it scans /usr/local/Domestik/Client/Probes directory and load all probes it found. Consequently, if you want to disable a probe, simply move the related file to /usr/local/Domestik/Client/inactive_Probes and restart the daemon.

Probes for which the filename is starting with linux_* may be ... linux dependent. it's mostly because they are relying on procfs filesystem.

Portability note

ProcFS also exists on other Unix flavors but I'm not sure same data are present : do the test and report thru a bug report or thru Domestik forum for compatibility ... or not.

Following probes need a special attention :

hardware

This probe will monitor hardware figures, using LM sensors. So you need first to install LM sensors and configure it for your system.

Then hardware sensors will be exposed in /sysfs and then integrated in Domestik.

CAUTION

Read carefully the LM_Sensors installation guide for your hardware and your operating system. Not correctly configured, LM_Sensors may damage your machine.

Based on discovered sensors and sysfs documentation, feed probes_list. For each probe, you have to provide 2 functions :

You can provide or a function, or the name of a function which is defined inside funcs table.

Be aware that sensors are not reachable on some system ... As example, Dell use proprietary methods to read internals.

The configuration provided for AK-47 motherboard that containing lot of sensors.

process_tracking

This probe allows to monitor the presence and resources consumed by some processes.

The configuration is done by the table process_tracking_list for which keys are process name. For each processes, 2 functions have to be provided :

  1. track_it : is this process' resources tracked or not, with following possible values :
  2. alert : do we have to raise an alert for this process, with following possible values :

You can provide or a function, or the name of a function which is defined inside funcs table.

hddtemp

Install hddtemp and start it in daemon mode.

smart (hard disk S.M.A.R.T. monitoring tool)

Follows the following procedure :

  1. Install smartmontools
  2. Create /usr/local/share/smartlog.sh helper script and make it executable
#!/bin/sh
# Notify smartd's errors

echo "$SMARTD_DEVICESTRING" "$SMARTD_MESSAGE" > /tmp/smartd.msg
  1. in smartd.conf, the only active line has to be
DEVICESCAN -m <nomailer> -M exec /usr/local/share/smartlog.sh
  1. restart smartd

Identify your host

Logon on administrative page of Domestik's server and create an user for your host.

CAUTION

Each and every host MUST be uniquely identified, even for testing purposes : sharing host account will only mess your data.

Modify Client/dmkcheck & Client/dmkcheckd with the account you just created.

Test if the configuration is working

It's time to see if the configuration is working :

/usr/local/Domestik/Client/dmkcheck
*I* Loading linux_memory ...
*I* Loading linux_cpuload ...
*I* Loading smart ...
*I* Loading filesystem ...
*I* Loading hddtemp ...
*E* Processing error :    200

The last line is the important one : 200 is the HTML return code to say "ok, operation successful". Any other return code means your facing a problem as in the following example :

 ./dmkcheck
*I* Loading linux_memory ...
*I* Loading linux_cpuload ...
*I* Loading hddtemp ...
*I* Loading linux_hardware ...
*I* Loading smart ...
*I* Loading filesystem ...
*E* Communication layer error - Return code :    401    *F* You must logon to access to this page

In this case, the password is probably wrong. Based on information you got after the error code ... be imaginative.

Make domestik's daemon starting at every bootup

Some startup scripts are provided in .../Client/Share/startscript. Which script to use depend on your OS. And obviously the installation has to be done as root.

If for whatever reason you can't or don't want use starting script, you may :

As you can see, only few scripts are provided. If you wrote a new one, please share.

OpenRC (Gentoo)

cp /usr/local/Domestik/Client/Share/startscript/dmkcheckd.openrc /etc/init.d/dmkcheckd
rc-update add dmkcheckd default
* service dmkcheckd added to runlevel default

And then finally ... launch it

/etc/init.d/dmkcheckd start
* Caching service dependencies ... [ ok ]
* Starting Domestik's daemon ... [ ok ]

upstart (Ubuntu)

cp /usr/local/Domestik/Client/Share/startscript/dmkcheckd.upstart /etc/init/dmkcheckd.conf

and launch it

start dmkcheckd

Lsb (all Debian derived including older Ubuntu)

cp /usr/local/Domestik/Client/Share/startscript/dmkcheckd.lsb /etc/init.d/dmkcheckd
update-rc.d dmkcheckd defaults

And then finally ... launch it

/etc/init.d/dmkcheckd start
 * Starting Domestik monitoring tool daemon: dmkcheckd

Network manager

Domestik's daemon will be launched only after network establishment. As a conclusion, if you're using Network Manager (which is the case of most user focused distributions), figures will be communicated only after an user logon.

LSB method doesn't work with Network Manager : the network is not ready when rc scripts are launched. The solution should be to create a custom script in /etc/NetworkManager/dispatcher.d


Visitez :
La liste de nos voyages
Nos sorties Ski et rando
Copyright Laurent Faillie 2001-2024
N'oubliez pas d'entrer le mot de passe pour voir aussi les photos perso.
Contactez moi si vous souhaitez réutiliser ces photos et pour les obtenir avec une plus grande résolution.
Visites durant les 7 derniers jours Nombre de visites au total.

Vous pouvez laissez un commentaire sur cette page.