Cool Solution - Gather UCC Status information
From Univention Wiki
univention-ucc-status allows to gather information about deployed UCC clients and be able to view them in the Univention Management Console. There is also the possibility to reuse the information in self-written scripts. An example for using univention-ucc-status is when UCC clients receive their IP Address from an external DHCP server, so their current IP Address is not visible in the Univention Management Console.
The following information is submitted by UCC clients:
- Their current IP Address
- The current image that is present on the local hard drive
- The last time the local image has been updated
- The last time a policy prompted the UCC client to update its software
- The last time an UCC client reported its status to the server
The status information for an UCC client can be viewed on the 'Status' tab after selecting the client in the 'Computers' module.
On the UCC client the package univention-ucc-status has to be installed.
apt-get install univention-ucc-status
On the UCS server the package univention-ucc-status-integration has to be installed from the UCS Cool Solutions Repository
An UCR variable can be set on UCC Clients via a policy to control to which URL the information should be reported to:
||URL the script univention-ucc-send-status uses to transmit information (default: http://[ldapmaster]/univention-ucc-status/updateuccstatus.py)|
UCR variables can be set on the UCS System which control the cronjob that regularly updates the status information sent by UCC clients:
||Activate the cronjob to update ucc status information (default: Yes)|
||Cronjob execution schedule (default every 30 minutes: */30 * * * *)|
The UCS package univention-ucc-status-integration installs a python-cgi script on the local webserver that is reachable at http://[hostname]/univention-ucc-status/updateuccstoatus.py. This script writes the transmitted information to a logfile. A cronjob checks the logfile and updates the LDAP with current values. The helper script univention-ucc-status-log-parser can be used to write scripts that want to use the logfile information for other tasks.
On an UCC client an upstart job gathers the client status information and sends them on each boot.