ZLM PHP Script to Monitor the Bundle Installation Status


Short Description:

This small php script allows you to easily monitor the installation status of your bundles.


For all zlm administrators that have the problem to assign a bundle to a big number of devices (eg. 200) and get just 175 response messages from the devices. So which one have not installed it is the great question and should be answered using this script.

Server Requirements:

  • Zenworks Linux Management 7.x

  • PostgreSQL must be your zlm database

  • You need a PHP enabled web server with the following packages installed (sample from a sles 10 system), I think version below should also work:

  • php5-xmlreader-5.1.2

  • php5-pgsql-5.1.2

  • php5-5.1.2

  • php5-mysql-5.1.2

  • php5-ldap-5.1.2

  • php5-mysqli-5.1.2

  • php5-dom-5.1.2


Copy the php file to the DocumentRoot of the web server (/srv/www/htdocs by default).


In the script you have to change a view lines for authentication information to zlm:

  1. line 40 and 60: put in the zlm server name

  • line 43: put in the password of the zlm Administrator account

  • line 63: put in the postgresql password from the file /etc/opt/novell/zenworks/serversecret

If you would like to use the zlm last contact information as well you have to do two more configurations:

  1. line 70: this is the time offset from UTC to your local time (Austria/Vienna is 3600 = 1 hour)

  • line 69: if the last contact is out of this value mark the last contact field as warning (21600 = 6 hours)


After everything is ready access the file from a browser using the following url:

http://<web server name>/zlm_bundle_installed.php

Here is the initial screen that shows all bundles that are assigned to any device, folder or group.
Bundles that are not assigned anywhere aren't listed:

After you select a bundle and submit the query the php script connects to the object store (edirectory) of zlm and searches for all assignments for that bundle. It collects them all, gathers some informations from the data store (postgresql) and builds the list of effected devices and their current status. The last row “Installed” will show you if the selected bundle is installed on that device. The web page will automatically refresh every 10 seconds so you see if something changes during a software distribution.

If you have problems with the script feel free to contact me.

Rainer Brunold


How To-Best Practice
Comment List
Related Discussions