Monitoring
From SystemImager
Contents |
Monitoring clients installation with SystemImager
| Overview
This document shows how to use the monitoring features of SystemImager. Monitoring allows to watch the details of the installation phases for all your clients. Monitoring is organized in two main components:
|
|
Setting up a monitor server
On the monitor server (typically is the same machine of the image server) simply run:
# /etc/init.d/systemimager-server-monitord start
This will start the si_monitor daemon. The data sent by the clients will be collected by si_monitor and stored in the XML /var/lib/systemimager/clients.xml. If you cannot execute X applications in your monitor server you can simply periodically look at that file to monitor the installations.
ATTENTION: never run si_monitor manually! Always use systemimager-server-monitord script.
Then simply run si_monitortk to launch the monitoring GUI.
Enabling clients to send monitoring data
- Define the following parameters to the kernel boot options of the clients:
- MONITOR_SERVER=IP|HOSTNAME: IP address or hostname of the monitor server
- MONITOR_CONSOLE=yes|no: enable or disable full console view, if enabled it's possible to follow all the installation session of the clients (stdout and stderr) in the monitoring interface (default is no)
Usually you need to define the parameters in /etc/systemimager/pxelinux.cfg/syslinux.cfg. This works both if you are installing via network boot or via CD. For example a monitoring-enabled configuration is like the following:
LABEL systemimager KERNEL kernel APPEND vga=extended initrd=initrd.img root=/dev/ram MONITOR_SERVER=192.168.1.1 MONITOR_CONSOLE=yes
- Remember to re-run si_mkclientnetboot (for PXE booting), si_mkautoinstallcd (for autoinstall CD booting) or si_mkautoinstalldisk (for autoinstall USB drive booting) to rebuild the configuration files or boot media to accept the new parameters defined above.
Troubleshooting
Scalability problems (fixed in 3.7.5)
- The current monitoring implementation does not scale when you have a lot of clients. To improve performances in large scale installations move the file /var/lib/systemimager/clients.xml in a ramdisk (typically /dev/shm).
The correct procedure (if you have the directory /dev/shm mounted with tmpfs) is the following:
# /etc/init.d/systemimager-server-monitord stop # touch /var/lib/systemimager/clients.xml # mv /var/lib/systemimager/clients.xml /dev/shm # ln -s /dev/shm/clients.xml /var/lib/systemimager/clients.xml # /etc/init.d/systemimager-server-monitord start
Remember that in this way all the data will be stored in RAM, so if you want to store those informations on a persistent support when you reboot the monitor server. For example remember to copy /dev/shm/clients.xml in /var/lib/systemimager/clients.xml.backup before you reboot or shutdown the machine.
Clients do not appear
- If you don't see the clients in the monitoring interface when they boot-up check the following issues:
- Do you have a firewall in your image server that filter the port 8181? The clients use that port to contact the image server.
- Try to use the IP address of the monitor server instead of the hostname.
- Are you sure the clients are using the correct boot parameters? (remember that you can check the parameters directly from the clients -if you have the access to the real console- looking in /proc/cmdline)
- Try to increase the verbosity of the si_monitor log changing the value LOGLEVEL=2 into LOGLEVEL=3 in /etc/init.d/systemimager-server-monitord and restart the monitor daemon (/etc/init.d/systemimager-server-monitord restart); all the logs are stored in /var/log/systemimager/si_monitor.log).
Performance improvements
To improve performance of the SystemImager monitoring system it's strongly suggested to install XML::LibXML or XML::SAX::Expat perl modules in your monitor server.
To install these modules in Debian/Ubuntu it's sufficient to execute:
$ sudo aptitude install libxml-perl
I've not a X server to see si_monitortk interface...
Clients can be monitored also if an X server is not available, for example if you're connected remotely via ssh on the image server and you've not enabled the X11 forwarding.
In this case simply look at the file /var/lib/systemimager/clients.xml. It's an XML, but the clients and the attribute names are quite nmemonic. You can periodically cat the file or write your own console monitoring scripts.
If you wrote a nice ncurses or a console interface feel free to post the patch to the sisuite-devel list.
See also
- perldoc si_monitortk
- perldoc si_monitor
--Righi 08:58, 10 August 2006 (CDT)
