The Secret Diary of Han, Aged 0x29

Archive for December 2006

Setting environment variables for mod-perl scripts in apache

The SNMP poller libraries depend on the POLLERHOME environment variable to find the right directory to search for configuration files. This works sufficiently well for normal apps. However, certain part are run from Apache using mod-perl. Now, due to my general lack of in-depth understanding of Apache I had a hard time figuring out how to set environment variables for this environment. Here are some approaches that do not work:

  • Set the variable in the root user environment
  • Use the “envvars” file in /usr/local/apache2/bin
  • Setting a var in the /usr/local/apache2/apachectl script

Finally, I found one that does work:

add a “PerlSetEnv POLLERHOME /apps/poller” after loading the mod_perl module in httpd.conf


Written by Han

December 11, 2006 at 11:44

Posted in Uncategorized

Timeout alerts on archiver

I noticed some timeout alerts in the Alert Archiver log today during insertBaseAlert and updateAlert.
When this happens, alerts don’t get saved or updated in the archive database. However, the archive flag in the alert doesn’t get set either, so the alerts will automatically be retried the next time the archiver runs.

Written by Han

December 6, 2006 at 16:11

Posted in Uncategorized