2013-10-10

Time to install MEM 3.0, and get its built-in agent working.

[ If you want some tips on What's New, have a look here. ]

I’ve downloaded the Monitor Server and the agent zipped s/w for Linux & Win from http://edelivery.oracle.com:

The Monitor install

So, on my Oracle Linux machine:

It all installs fine. No issues, if you’re used to MEM 2.3.

Double check your configuration_report.txt :

To startup | shutdown:

Before looking any further, once it’s started up, I personally see that my poor little Virtualbox VM is screaming for more memory, eating swap. My fault for keeping it too tight. java, jsvc & mysqld procs are a little high, for my demo env.

Especially as I plan to do as much as possible in this env (replication, utilities, etc.) so I’ll end up with 3x mysqld’s, as well as java, etc.

Remember: this is my own doing. You won’t want to do this in a proper production environment. Au contraire, you’ll probably want to assign more memory, etc.

To see which the ‘root’ user is for mysql CLI access:

don’t know why you’d want to play around there though.

Now go to the console http://192.168.56.104:18080 and complete the setup instructions. You’ll see a more blank version of the console, but it’s something like this: Also, the cool thing is, before we actually go and install any agent, the monitor will automatically detect the other MySQL instances on the same server. In fact, what you can see here is when I actually deleted an existing entry for a specific previously detected and monitored instance. MEM acknowledges that you’re deleted it, but it will still tell you that you’ve an unmonitored instance.. just waiting for you to add it in:



Unmonitored Instance

Agent install

I’m giving it a specific path under “agent56” as I know I’ll be installing other agents later…

Ok, so I forgot to let root access from that IP. Let’s keep it simple:

[ Didn't see any passwords or asterisks, did you? Try and find them.. go on. "Bigger, Stronger..." ]

Also, remember that if no entry is given to any particular answer, it will take the default, i.e. the option in uppercase (Y/n) or if you’re relaunching a ctrl-c’ed agent install, it will read you back the previous config.

Now, I want to take a moment to point out that the README‘s are sometimes useful, so, I suggest doing what their name hints upon, because:

Adding instances

As you might have seen before, the agent automatically detected a 5.7 instance. So let’s go and monitor it:



Choosing whether to Monitor or not.

Add the specifics:

remember, in this example I’m using memagent, who has the “with grant option” priv, so that it can create the lesser privileged General & Limited users. This will let MEM do the tasks it needs to do, without having to use root all the time, max out the connections for the root user, etc.

If a group already exists that we want to add this unmonitored instance to, we can also do so:

and once we’ve added the instance, we refresh and wait a couple of minutes or so, and should then see if happily sitting in its group, and because it’s local the the MEM server, it’s also got o.s. monitoring:

All OK.

When adding, deleting or whatever with the instances, and you’re not quite sure what’s going on, and refreshing like mad on the console, you might want to check things like user privileges, as I initially forgot to give my memagent the appropriate privileges, and I received an error in the /opt/mysql/enterprise/agent/logs/mysql-monitor-agent.log. The console itself will tell you also that Access Denied so there are hints as to what’s going wrong, as these issues will appear under Bad Configurations that appears.

Once I had deleted the instance, adjusted the privs, and added again, it was all ok.

Don’t ignore me

Now, in the previous image, you’ll see a highlighted instance that’s down. I know why it’s down, say we don’t have enough resources to keep them running all the time and/or it’s a rare occasion that we want to monitor it really, or maybe we’re evaluating 5.7.2 or something.

So let’s ignore it:

Selecting the ‘ignore instance’ option.

Making sure…

It’s confirmed. 1 ignored instance.

but once we’re done, we want it back again. But how do we get it back? On the host itself, there’s not a “show me an ignored instance” option.

It might be a little subtle, but everything in MEM 3.0 is there for a reason. There’s little redundancy and not too many of those “more than one way to skin a cat” type accesses. I like the fact that it’s just ‘efficient’.

So, under the 3 buttons “Create Group”, “Add MySQL Instance”, “Add Bulk MySQL Instances”, you’ll find the “MySQL Instance Details” bar, where, on the far right is a magnifying glass. Hit it.

This is the filter, and why we see what we actually do.

And the last button is “Ignored Instance” with the “Disabled option” by default. Choose “(any)” or “Enabled” and then hit the Filter button.

“(any)” shows us all of the instances, ignored and not, and “Enabled” will only show us that poor little ignored instance.

And now just choose the “Show Instance” option, and they’re back. Hello again!

Deleting instances

Say we make a mistake upon config time when adding an unmonitored instance and it appears in the Bad configs section. We can delete them again, via the “Delete Instance” option in the dropdown meno next to the check box.

The mysql-monitor-agent.log will say:

Deleted connection to server com.mysql.etools.agent.collection.MysqlConnection@12fad5

And the recently deleted auto-detected instance reappears as an Unmonitored instance.

So I click on the down-pointing arrow for the “Monitor instance | Ignore instance” dropdown. Choose “Monitor..”.

Leaving the “Monitor from” dropdown as is, I enter the IP address for the port number I’m interested in, 3357, and away we go.

If we added an instance manually, i.e. remotely monitored, and then delete it, if we use the filter on the MySQL Instance Details search button, and use Ignored Instance = (any), then we’ll see that when an instance is deleted, it’s first ignored, i.e. appears in italics, and when we insist, and click on the name, is says

“No MySQL Instance was selected or the connection details for the instance can not be obtained. (U0331)“.

We can be even more persistent, and click on “Refresh inventory”, but if we start clicking around and refreshing, then we’ll find that they will be removed before we can play around. Which is just what we wanted.. isn’t it now?

Remotely Monitored

Right, I’ve got a Raspberry Pi MySQL Cluster that I want to monitor. So, because ARM isn’t a supported platform, we’ll monitor that by some other means, and therefore, I can remotely monitor the cluster. Here’s how.

Adding:

“Add MySQL Instance” button, and on the Connection Settings tab, use the “Monitor From” entry of “ol63uek01: MEM Built-in Agent”. Mainly as you’re indicated to do so, by the ? question mark: “if there is no local Agent on the host and you are unable to install one, use the built-in or another Agent to monitor remotely.“

The ? hint.

Once I’m happy with all the info, hit “Add Instance” and we get notified (top right):

Create a group for the newly added remote instances

Very simple, as this is a Raspberry Pi MySQL Cluster, I hit the Create Group button, under the MySQL Instance Details section, and just enter the group name you desire.

Now, I can configure events and advisors per group, and make it specific. This could have been Dev, Test, Preprod or whatever.

Add to group

Now to add the 2x instances to the group.

Click on the dropdown beside the name of the group, and hit “Add to Group”. The dialogue box comes up, and asks us which of the discovered instances we want to add, and so I select the 2 I’m interested in.
and we’re fit.

Notice the “Ungrouped” instances group disappears.

All we need to do now, is look at all the already enabled Advisors for each of my instances and see if I want to make anything group specific, or not, startup some SNMP trap forwarding using the /opt/mysql/enterprise/monitor/support-files/MONITOR.MIB file, and so on and so forth.

Hope this helped.

PlanetMySQL Voting:
Vote UP /
Vote DOWN

Show more