Tag Archives: CLI

Making cisco MDS switches log to an external (syslog) server

Cisco MDS

Configuring a Cisco SAN switch to have it send logging to an external syslog server by using the GUI is quite easy to do:

Floow the steps as I walk through DM: click “logs”, then “syslog”, then “setup”

If any syslog server is already configured, you’ll find it here:

You can either delete an existing or create a new entry, but you cannot have more than three entries in total!

If you prefer to have an entry using IPv4 or IPv6, choose IPv4 or IPv6, otherwise use DNS and simply type in its name.

I’ve tried this method to change an existing entry and somehow it wouldn’t stick. Deleting three entries, clicking refresh and 2 came right back…. I failed back to the command line.

The CLI is actually easier, but with less overview of what you’re doing. If you need to list the existing syslog servers, type “show logging”. In the extensive sum-up that follows are the servers you’ve configured so far. If a servers needs to be adjusted, don’t bother to first delete it, because a new entry will overwrite the existing line. But if you need to actually delete one, type “no logging server” followed by its name or IP.

A new entry is made by typing

logging server name-of-the-syslog-server.domainname.extension [severity] port 6514 facility syslog

if you want to use the IP of the server, don’t type its name, but the IP, the syntax is the same. Severity is for example “6” so any message of severity “notice(6)” and lower (more important) will be sent. I’ve put port 6514 here as an example for secure syslog, but any other port will do just fine as well.

If you want thee syslog server entries, repeat the “logging server” line three times, one for each syslog target.

Oh, don’t forget to ask the firewall admin to open the port that you will be using 😉

Don’t forget to save the new config. That’s it!

How to test the alerting in a Pure Storage FlashArray

When configuring SMTP or syslog for alerting the easiest way to configure is in the GUI, simply because everything you need to configure is right there in plain sight.

For this example, we will assume the syslog servers and SMTP relay host and sender domain have been specified. If not, these can be set from the GUI under Settings > System > Syslog servers and Settings > System > Alert Routing.

But to test if it all works is a different story: there’s no test button!

So we need to log on to the CLI. Use your favorite SSH client and log on the the array.

Syslog

First you can view if the syslog was configured according to your liking by entering the command:

purelog list

You should now see the configured syslog servers and the ports that are used.

To test if syslogging works enter the command:

purelog test

SMTP

For emails the command to view the settings is:

purealert watcher list

You should now see the email addresses that will be used whenever the array needs to send an email. To test this you need to use the following command:

purealert watcher test address@domain.com

If all goes well you will then receive an email similar to:

Hello,

This is a test message from your Pure Storage Array.

Controller Serial: PCTFL1953173B
-Pure Storage Array PUREARRAY-027-ct0

Useful EMC VMAX CLI commands

VMAX

Over the years I collected a number of useful CLI commands to control the DMX / VMAX machines I worked with. Even though nowadays Unisphere for VMAX is a useful tool, nothing really beats the command line!
Read more »

Create and retrieve spcollect files from the command line (VNX)

Hard Drive

Java, it’s a curse. And now you suddenly need to upload the spcollect files to EMC and Java isn’t installed or incompatible and Unisphere won’t start.

Now what?

Make sure you have NAVISECCLI installed and just do it from the CLI!

Read more »