At our company we run zimbra as our collaboration tool and we use zabbix as our monitoring solution. Almost every service we have is monitored nicely, but unfortunately our zimbra was not. Because zimbra exists out of several services you want to know the status of every service. For that I wrote a little script.
First of all the zabbix agent configuration:
UserParameter=zimbra.clamav,/etc/zabbix/check_zimbra.sh antivirus
UserParameter=zimbra.spam,/etc/zabbix/check_zimbra.sh antispam
UserParameter=zimbra.logger,/etc/zabbix/check_zimbra.sh logger
UserParameter=zimbra.mailbox,/etc/zabbix/check_zimbra.sh mailbox
UserParameter=zimbra.mta,/etc/zabbix/check_zimbra.sh mta
UserParameter=zimbra.snmp,/etc/zabbix/check_zimbra.sh snmp
UserParameter=zimbra.spell,/etc/zabbix/check_zimbra.sh spell
UserParameter=zimbra.stats,/etc/zabbix/check_zimbra.sh stats
This use the custom check_zimbra:
#!/bin/bash
check=$1
maxage=30
file='/tmp/zimbra_status'
#check if file exists
if [[ -e $file ]]
then
OLD=`stat -c %Z $file`
NOW=`date +%s`
export PATH=$PATH:/opt/zimbra/bin
# if older then maxage, update file
if [[ `expr $NOW - $OLD` -gt $maxage ]]
then
sudo -u zimbra zmcontrol status > $file
fi
else
export PATH=$PATH:/opt/zimbra/bin
sudo -u zimbra zmcontrol status > $file
fi
AVSTATUS=`cat $file |grep $check|awk '{ print $2 }'`
if [[ $AVSTATUS != "Running" ]]; then
echo 0
fi
echo 1
As you can see we store the output of the slow zmcontrol in a file for a configurable amount of time. This way you can cache that output and win some time.
For this to run you need to add the next rule to the /etc/sudoers file:
zabbix ALL=(zimbra) NOPASSWD:/opt/zimbra/bin/zmcontrol
Last Monday I released a first version of Node Page Template.
This little module makes it possible to configure a page template per content type and per node. It also makes a node template suggestions based upon that page template.
Default theme function makes an Node template suggestion per content type and per node, and this adds a Page template suggestion. When 'Default' is selected, there is no additional suggestion.
More information can be found at http://drupal.org/project/node_page
Happy theming.
Last Monday I released a patch for AutomaticMenu to make it Drupal 6 compatible. While I was at it, I included i18n support, with the possibility to select a different parent menu item per language per content type. I use it at a customers site and no problems reported so far. You can find more information about the patch and the port in total at http://drupal.org/node/275889
Everybody knows de difficulties of managing content when using staging for his website. To tackle that problem I started writing my own sync module and when I created a project page for it on drupal.org, one of the first issues created was stating that the Deploy module was practically the same thing. After checking out the deployment module myself I had to agree with that.
Since I discussed this issue up front with a lot of people and no one even mentioned this module it is clear that this really wanted module is just unknown.
So spread the word and start testing the deploy module.
The deployment framework is a series of modules which are designed to allow developers to easily stage Drupal data from one site to another. This includes content (nodes, taxonomy, users, etc) as well as configuration (views, content types, system settings, etc.) Not only can it push new content, it can also push updates to existing content. Deploy automatically manages dependencies between nodes (IE nodereferences) as well as between other objects. It is designed to have a rich API which can be easily extended to be used in a variety of situations. Check out the screencast for a demo!
I was creating a new website for a customer and I thought imagefield_gallery would be a nice to have. Since the module didn't have a drupal 6 version, I ported the module to D6. Today I released the patch at http://drupal.org/node/299122#comment-1691890
Please test and comment.
In order to get the service more error prone, I added some logic to disable erroneous websites. Websites are disabled when the two last checks failed and in total 75% of all checks failed.
Users are able to re-enable the site by just editing the entry in their list. At that time the website is verified, and when successful it is enabled again.
This update will also be applied on the cron module.
I just added a new module to drupal.org: password_trigger. With this module an email notification is send to the user of who the password is changed.
An administrator can configure the email, as every user email, at admin/user/settings.
You can find the new project at: http://drupal.org/project/password_trigger
After the update of drupalcron to support the cron_key for drupal 7 it is time to apply those changes to the cron module.
Also the added curl options at drupalcron are added to the cron module.
Today I had some time to update drupalcron.
Bugfixes:
Change of curl options to solve problems with unreachable sites
New features:
Support for drupal 7 cron. You're now able to add the in drupal 7 added cron_key.
Has anyone a clue on this one ?
sudo cat /proc/sys/fs/file-max
1048576
sudo cat /etc/security/limits.conf
* soft nofile 1048576
* hard nofile 1048576
sudo cat /etc/sysctl.conf
fs.file-max=1048576
ulimit -n
1048576
But yet when my service starts at boot:
sudo cat /proc/pid/limits | grep files
Max open files 1024 1024 files
Whenever I restart my service everything is ok:
sudo cat /proc/pid/limits | grep files
Max open files 1048576 1048576 files
This is running on a Debian Etch with kernel 2.6.28
Recent comments
2 weeks 12 hours ago
2 weeks 15 hours ago
6 weeks 3 days ago
9 weeks 1 day ago
9 weeks 3 days ago
13 weeks 5 days ago
21 weeks 3 days ago
21 weeks 3 days ago
21 weeks 4 days ago
21 weeks 4 days ago