Over at INEX we’ve embarked on a forklift upgrade of the primary peering LAN using Extreme Networks Summit x670’s and x460’s. As usual, we need to monitor these 24/7 and we have just written a new Extreme Networks chassis monitoring script which should work with most Extreme devices.
It will check and generate alerts on the following items:
- a warning if the device was recently rebooted;
- a warning / critical if any found temperature sensors are in a non-normal state;
- a warning / critical if any found fans are in a non-normal state;
- a warning / critical if any found PSUs are in a non-normal state (or missing);
- a warning / critical if the 5 sec CPU utilisation is above set thresholds;
- a warning / critical if the memory utilisation is above set thresholds.
You’ll find the script in this Github repository: barryo/nagios-plugins.
A some verbose output follows:
./check_chassis_extreme.php -c -h 10.11.12.13 -v
CPU: 5sec - 4%
Last reboot: 4007.7666666667 minutes ago
Uptime: 2.8 days.
PSU: 1 - presentOK (Serial: 1429W-xxxxx; Source: ac)
PSU: 2 - presentOK (Serial: 1429W-xxxxx; Source: ac)
Fan: 101 - OK (4388 RPM)
Fan: 102 - OK (9273 RPM)
Fan: 103 - OK (4428 RPM)
Fan: 104 - OK (9273 RPM)
Fan: 105 - OK (4551 RPM)
Fan: 106 - OK (9452 RPM)
Over temp alert: NO
Memory used in slot 1: 29%
OK - CPU: 5sec - 4%. Uptime: 2.8 days. PSUs: 1 - presentOK;
2 - presentOK;. Overall system power state: redundant power
available. Fans: [101 - OK (4388 RPM)]; [102 - OK (9273 RPM)];
[103 - OK (4428 RPM)]; [104 - OK (9273 RPM)]; [105 - OK (4551
RPM)]; [106 - OK (9452 RPM)];. Temp: 39'C.
Memory (slot:usage%): 1:29%.
I’ve just released a Laravel 4 package which contains a service provider to the Doctine2 entity manager and the Doctrine2 cache. These are made available via facades named D2EM and D2Cache respectively.
Currently it uses the XML schema method for defining entities but this can easily be augmented with the other methods. Also, ArrayCache and MemcacheCache are fully supported caching interfaces. Any other cache that requires no configuration is also supported but some trivial coding will be required for caching backends required configuration.
Combining this with TwigBridge, we have an excellent framework with Laravel 4!
I came across Pushover recently which makes it easy to send real-time notifications to your Android and iOS devices. And easy it is. It also allows you to set up applications with logos so that you can have multiple Nagios installations shunting alerts to you via Pushover with each one easily identifiable. After just a day playing with this, it’s much nicer than SMS’.
So, to set up Pushover with Nagios, first register for a free Pushover account. Then create a new application for your Nagios instance. I set the type to Script and also upload a logo. After this, you will be armed with two crucial pieces of information: your application API tokan/key (
$APP_KEY) and your user key (
To get the notification script, clone this GitHub repository or just down this file – notify-by-pushover.php.
You can test this immediately with:
echo "Test message" | \
./notify-by-pushover.php HOST $APP_KEY $USER_KEY RECOVERY OK
The parameters are:
USAGE: notify-by-pushover.php <$APP_KEY> \
Now, set up the new notifications in Nagios / Icinga:
# 'notify-by-pushover-service' command definition
command_line /usr/bin/printf "%b" "$NOTIFICATIONTYPE$: \
$SERVICEDESC$@$HOSTNAME$: $SERVICESTATE$ \
($SERVICEOUTPUT$)" | \
SERVICE $APP_KEY $CONTACTADDRESS1$ \
# 'notify-by-pushover-host' command definition
command_line /usr/bin/printf "%b" "Host '$HOSTALIAS$' \
is $HOSTSTATE$: $HOSTOUTPUT$" | \
HOST $APP_KEY $CONTACTADDRESS1$ $NOTIFICATIONTYPE$ \
Then, in your contact definition(s) add / update as follows:
Make sure you break something to test that this works!
NOCtools (a mixed bag collection of tools and utilities for NOC engineers) and OSS_SNMP (a PHP SNMP Library for People Who HATE SNMP, MIBs and OIDs) have just gotten support for Multiple Spanning Tree.
Specifically, OSS_SNMP has two new MIBS (Cisco’s original MST tree which has a lot of deprecated nodes – MIBS\Cisco\MST; and the newer IEEE tree – MIBS\Cisco\SMST). With these, we can, for example, get an array of
[instanceID] => instanceName values from a switch by just coding:
$ciscosw = new \OSS_SNMP\SNMP( $ip, $community );
print_r( $ciscosw->useCisco_SMST()->instances() );
NOCtools has the more impressive use cases of these new features. Specifically (and just likes its RSTP/pvrspt functionality), it can:
- Show MST port roles (root, designated, alternate, etc) for a given (or all) MST instance(s) – this is equivalent to the RSTP version;
- From a given device, it can crawl all CDP neighbours and create a graph of all devices, their connecting ports and the MST roles of those ports. This is a really useful feature as it means you don’t need to log into multiple switches to get a handle on what links are blocking. See documentation and a sample diagram here.
This post is much less of a detailed how-to but rather some useful links. We were tasked with the job of sync’ing about 1,000 MS Exchange mailboxes to a Dovecot server. This needed to be done via an administrator account on the Exchange end as individual user passwords were not available.
The tool of choice for this is imapsync. Unfortunately, there is not a single formula that will work for all as it can depend on the Exchange configuration and version as well as the use of domains on the Exchange and ActiveDirectory servers.
To help understand the various combinations of logins for Exchange, I found the following invaluable: Understanding login strings with POP3/IMAP.
Also invaluable is the imapsync FAQ – just search for mentions of Exchange.
In the end, the following worked for me (but your mileage will most definitely vary!):
./imapsync --host1 exchange-server
--user1 'domain/adminuser/user' --password1 'admin-password'
--host2 dovecot-server --user2 email@example.com
One key element here is that when logging into Exchange as an individual user I had to use
--authmech1 NTLM but if you use this auth method with the above user string, you will always end up logging into the admin’s mailbox, not the user’s. That, at least, was my experience.