Tool

bbendily's picture
tool
Reads:

7302

Score:
2.666665
2.7
3
 
Comments:

0

Multipath Monitor

Author Info

22 January 2010 - 2:30pm
Submitted by: bbendily

(View Disclaimer)

license: 
free

Multipath Monitor will compare the output of the "multipath -ll" command and send an email if a difference is found. This can be used to run on OES clusters or any Linux server that you attach to a SAN and use multipath. This can help you monitor for "failed" or "disabled" or any other unexpected changes in the pathing of your devices.

In some cases you may get false positives. Some examples, if a server gets rebooted the device IDs or names may change. Also, on one server, for a day or two, an extra space was put between the device ID and the device Name. Otherwise this has been very useful to let us know of changes as multipath itself does not send any notifications of failures or missing devices.

Attached you will find a tar file that contains 4 files.
The installer should be run as root.
The "install-multipath-check.sh" file will create a directory "/etc/multipath/" and then copy the files there.
The installer will add an entry to /etc/crontab to run the script once per hour.
Then it will execute the script to check that everything is correct.

The actual script is multipath_check.sh. You will need to edit the email
address "emailaddress@example.com" in the script to have the output sent to
your desired address.

The script will execute a "multipath -ll" command and overwrite the existing
multipaths.diff file, then compare it to the static multipaths file. If they're the same,
it will exit, if they're different then an email will be sent. The script will send 5 emails, one per hour, and then stop sending. To reset the multipath files you can execute:

cat /etc/multipath/multipaths > /etc/multipath/multipaths.diff

The script will send the reset instructions in the email, as well as the output of the "multipath -ll" command.

Good Luck.
BB

Attachmentサイズ
multipath-monitor.tar10 KB

Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).

It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.




User Comments

© 2013 Novell