Matt Pson Just another dead sysadmin blog

6Nov/11Off

Getting Cacti working with Zend’s PHP packages

In short: you don't.

Backstory: having a server running some webbapplications using the Zend PHP packages for Debian using their repository (from the file /etc/apt/sources.list):

# zend server community edition via zend's repository
deb http://repos.zend.com/zend-server/deb server non-free

...and now we wanted to move our existing Cacti installation to this server in order to put a old server to sleep. It's should be an easy task we thought after doing some Google searches and made up a small checklist (borrowed from [HOWTO] Migrating Cacti From One Server to Another):

  1. Install the official Debian Cacti packages on the new server and make sure it works
  2. Turn off Cacti at the old server in order to have a known state of the database
  3. Migrate the database to the new server
  4. Copy the RRD files as XML
  5. Reconvert the XML back to RRD files
  6. Activate the new Cacti

As it would turn out the first item on the checklist was the one that gave us some major troubles.

It soon became apparent that Zend's version of PHP did not include any support for SNMP and any attempt to install PHP related packages via Debians own repositories threatened with the uninstallation of the Zend specific packages - thus breaking the existing applications.

Some further investigation also showed that Cacti used the PHP Data Objects (PDO) interface to connect to MySQL which also wasn't available in the Zend version.

Both these things were used only by the datacollector poller.php and not by the webinterface bit of Cacti which worked straight out of the box.

Our solution: download a recent PHP source (5.3.8) and compile it with the needed options like:

configureĀ  --with-snmp --disable-cgi --with-zlib --with-bz2 --with-curl --with-mysql --with-pdo-mysql --enable-sockets

install it in /usr/local and point Cacti to it in order to use it for all scripts (the option is at Console -> Settings -> Paths, a bit down the page you'll find "PHP Binary Path"). Then it works, data started to flow in from the 1000's of datasources we have.

Not that when we got to point 3 on our list, "Migrate the database to the new server", we had reconfigure this again as the settings from the old server overwrote the one on the new server. That one took us more than 10 minutes to figure out šŸ˜‰

25Apr/11Off

Installing Solaris via CIMC – nope, not possible

Well, actually it very much possible to install Sun Oracle Solaris via the CIMC on the C200/C210 servers as long as one does not rely on the 'Virtual Media' function to mount a iso-file to install from. The installation just grinds to a halt when it tries to figure out where the CD-Rom is. From the look of it the installer finds the physical drive and tries to attach itself to that for the rest of the installation and just ignores the virtual one.

Now if I had known that before I left work as going there, to the data centre, Ā just to insert a CD and go back home again seems like a lot of time for very little work (erhm... no, I'm not working from home again, am I?).