[Check_mk (english)] Check_mk agent with xen plugin...how to enable?

Hi

I’ve got the check_mk_agent installed on my centos based Xen server. I’ve copied the xen agent plugin into the plugins dir, but when I do an inventory of this host, all I see is the standard agent stuff and nothing xen specific.

Is there something that needs to be done to get xen/plugins working (this is my first try at agent plugins)?

I see on the check_mk exchange there is a mkp package which installs on the check_mk server with check_mk –P install xen-1.0.mkp…is there is similar way I should be installing this mkp onto the agent/client?

Thanks

jason

Hi,

Hi
I've got the check_mk_agent installed on my centos based Xen server.

I've

copied the xen agent plugin into the plugins dir, but when I do an
inventory of this host, all I see is the standard agent stuff and

nothing

xen specific.

Is there something that needs to be done to get xen/plugins working

(this

is my first try at agent plugins)?

I see on the check_mk exchange there is a mkp package which installs on
the check_mk server with check_mk -P install xen-1.0.mkp...is there is
similar way I should be installing this mkp onto the agent/client?

you should, if possible, use the mkp version.
what you're missing right now as far as I understand, is the check.

A normal mkp will have at least 3 pieces:
- agent plugin: installs below local/share/check_mk/agents,
the admin needs to transport it to the monitored system's
/usr/lib/check_mk_agent/plugins directory.
- check plugin: the actual check to be run on the Check_MK server. The
install will put it to
local/share/check_mk/checks
- A man page going to local/share/check_mk/checkman

Well, final comments:
mkp does not technically need OMD but if you're not using OMD, you should
:wink:
mkp comes with a list option that saves you all this searching
hope the plugin works fine for you, if you're running Xen newer than 4.1.2
then
you'll need to adjust the agent a little.

For standard CentOS outdatedness, it should work out of the box :slight_smile:

Florian

···

On Thu, 17 Nov 2011 16:38:41 +0000, Jason Humes <JHumes@acs.on.ca> wrote:

--
Mathias Kettner GmbH | \/ | |/ / M A T H I A S K E T T N E R
Florian Heigl | |\/| | ' /
Steinstr. 44 | | | | . \ Linux Beratung & Schulung
81667 München |_| |_|_|\_\ http://mathias-kettner.de
Tel.: 089 / 1890 4210
Fax.: 089 / 1890 4211 Mail: fh@mathias-kettner.de

Hi
So I think that's pretty much what I've done. On my OMD :slight_smile: check_my server, as the omd site user, I ran check_mk -P install xen-1.0.mkp. After I run check_mk -P list and it shows xen. I copied the xen file from the local/share/check_mk/agents/plugins/ dir to the plugins dir on the client/agent, re-scanned/inventory the client and no xen services. I've restarted xinetd on the client to restart the check_mk_agent after copying the file, but it didn't seem to make any difference. One thing, when doing a man on the xen.vms check, it gives an error, but the xen.mem man page works...

Thanks for the quick response, none the less :slight_smile:

J

···

-----Original Message-----
From: Florian Heigl [mailto:fh@mathias-kettner.de]
Sent: Thursday, November 17, 2011 12:15 PM
To: Jason Humes
Cc: checkmk-en@lists.mathias-kettner.de
Subject: Re: [Check_mk (english)] Check_mk agent with xen plugin...how to enable?

Hi,

On Thu, 17 Nov 2011 16:38:41 +0000, Jason Humes <JHumes@acs.on.ca> wrote:

Hi
I've got the check_mk_agent installed on my centos based Xen server.

I've

copied the xen agent plugin into the plugins dir, but when I do an
inventory of this host, all I see is the standard agent stuff and

nothing

xen specific.

Is there something that needs to be done to get xen/plugins working

(this

is my first try at agent plugins)?

I see on the check_mk exchange there is a mkp package which installs
on the check_mk server with check_mk -P install xen-1.0.mkp...is there
is similar way I should be installing this mkp onto the agent/client?

you should, if possible, use the mkp version.
what you're missing right now as far as I understand, is the check.

A normal mkp will have at least 3 pieces:
- agent plugin: installs below local/share/check_mk/agents, the admin needs to transport it to the monitored system's /usr/lib/check_mk_agent/plugins directory.
- check plugin: the actual check to be run on the Check_MK server. The install will put it to local/share/check_mk/checks
- A man page going to local/share/check_mk/checkman

Well, final comments:
mkp does not technically need OMD but if you're not using OMD, you should
:wink:
mkp comes with a list option that saves you all this searching hope the plugin works fine for you, if you're running Xen newer than 4.1.2 then you'll need to adjust the agent a little.

For standard CentOS outdatedness, it should work out of the box :slight_smile:

Florian

--
Mathias Kettner GmbH | \/ | |/ / M A T H I A S K E T T N E R
Florian Heigl | |\/| | ' /
Steinstr. 44 | | | | . \ Linux Beratung & Schulung
81667 München |_| |_|_|\_\ http://mathias-kettner.de
Tel.: 089 / 1890 4210
Fax.: 089 / 1890 4211 Mail: fh@mathias-kettner.de

So,

> Hi
> So I think that's pretty much what I've done. On my OMD :slight_smile: check_my server, as the omd site user, I ran check_mk -P install xen-1.0.mkp. After I run check_mk -P list and it shows xen. I copied the xen file from the local/share/check_mk/agents/plugins/ dir to the plugins dir on the client/agent, re-scanned/inventory the client and no xen services. I've restarted xinetd on the client to restart the check_mk_agent after copying the file, but it didn't seem to make any difference. One thing, when doing a man on the xen.vms check, it gives an error, but the xen.mem man page works...

Please send me the error message. Hopefully that is just a type I didn't catch. The man page is a quite new part of the check ;))

> Thanks for the quick response, none the less :slight_smile:

lets just find the issue :wink:

cd /usr/lib/check_mk_agent/plugins
./xen

does this look like the following?

waxh0002:/usr/lib/check_mk_agent/plugins# ./xen
<<<xen>>>
vm xen01 running
vm xen02 running
vm xen03 running
vm xen04 running
vm xen05 running
vm xen07 running
vm xen08 running
vm xen09 running
vm xen10 running
mem 8183 2542 245

if not it's one of two things:
- no execute permissions or
- the function look_for_xen does not work on your system

Then it would be thinking you don't have a Xen dom0 running there.

Florian

···

On 11/17/11 19:31, Jason Humes wrote:

--
Mathias Kettner GmbH | \/ | |/ / M A T H I A S K E T T N E R
Florian Heigl | |\/| | ' /
Steinstr. 44 | | | | . \ Linux Beratung & Schulung
81667 München |_| |_|_|\_\ http://mathias-kettner.de
Tel.: 089 / 1890 4210
Fax.: 089 / 1890 4211 Mail: fh@mathias-kettner.de

OMD[testsite]:~$ check_mk -M xen.vms
Syntax error in /omd/sites/testsite/local/share/check_mk/checkman/xen.vms line 8 (need more than 1 value to unpack).

Ok, I'll let you know about the output of the ./xen shortly.

Thanks again

J

···

-----Original Message-----
From: Florian Heigl [mailto:fh@mathias-kettner.de]
Sent: Thursday, November 17, 2011 2:15 PM
To: Jason Humes
Cc: checkmk-en@lists.mathias-kettner.de
Subject: Re: [Check_mk (english)] Check_mk agent with xen plugin...how to enable?

So,

On 11/17/11 19:31, Jason Humes wrote:
> Hi
> So I think that's pretty much what I've done. On my OMD :slight_smile: check_my server, as the omd site user, I ran check_mk -P install xen-1.0.mkp.
After I run check_mk -P list and it shows xen. I copied the xen file from the local/share/check_mk/agents/plugins/ dir to the plugins dir on the client/agent, re-scanned/inventory the client and no xen services.
I've restarted xinetd on the client to restart the check_mk_agent after copying the file, but it didn't seem to make any difference. One thing, when doing a man on the xen.vms check, it gives an error, but the xen.mem man page works...

Please send me the error message. Hopefully that is just a type I didn't catch. The man page is a quite new part of the check ;))

> Thanks for the quick response, none the less :slight_smile:

lets just find the issue :wink:

cd /usr/lib/check_mk_agent/plugins
./xen

does this look like the following?

waxh0002:/usr/lib/check_mk_agent/plugins# ./xen <<<xen>>> vm xen01 running vm xen02 running vm xen03 running vm xen04 running vm xen05 running vm xen07 running vm xen08 running vm xen09 running vm xen10 running mem 8183 2542 245

if not it's one of two things:
- no execute permissions or
- the function look_for_xen does not work on your system

Then it would be thinking you don't have a Xen dom0 running there.

Florian

--
Mathias Kettner GmbH | \/ | |/ / M A T H I A S K E T T N E R
Florian Heigl | |\/| | ' /
Steinstr. 44 | | | | . \ Linux Beratung & Schulung
81667 München |_| |_|_|\_\ http://mathias-kettner.de
Tel.: 089 / 1890 4210
Fax.: 089 / 1890 4211 Mail: fh@mathias-kettner.de

Hi
We're running Xen5.5....what adjustments need to be made to the check?

Thanks

Jason

···

-----Original Message-----
From: Florian Heigl [mailto:fh@mathias-kettner.de]
Sent: Thursday, November 17, 2011 2:15 PM
To: Jason Humes
Cc: checkmk-en@lists.mathias-kettner.de
Subject: Re: [Check_mk (english)] Check_mk agent with xen plugin...how to enable?

So,

On 11/17/11 19:31, Jason Humes wrote:
> Hi
> So I think that's pretty much what I've done. On my OMD :slight_smile: check_my server, as the omd site user, I ran check_mk -P install xen-1.0.mkp.
After I run check_mk -P list and it shows xen. I copied the xen file from the local/share/check_mk/agents/plugins/ dir to the plugins dir on the client/agent, re-scanned/inventory the client and no xen services.
I've restarted xinetd on the client to restart the check_mk_agent after copying the file, but it didn't seem to make any difference. One thing, when doing a man on the xen.vms check, it gives an error, but the xen.mem man page works...

Please send me the error message. Hopefully that is just a type I didn't catch. The man page is a quite new part of the check ;))

> Thanks for the quick response, none the less :slight_smile:

lets just find the issue :wink:

cd /usr/lib/check_mk_agent/plugins
./xen

does this look like the following?

waxh0002:/usr/lib/check_mk_agent/plugins# ./xen <<<xen>>> vm xen01 running vm xen02 running vm xen03 running vm xen04 running vm xen05 running vm xen07 running vm xen08 running vm xen09 running vm xen10 running mem 8183 2542 245

if not it's one of two things:
- no execute permissions or
- the function look_for_xen does not work on your system

Then it would be thinking you don't have a Xen dom0 running there.

Florian

--
Mathias Kettner GmbH | \/ | |/ / M A T H I A S K E T T N E R
Florian Heigl | |\/| | ' /
Steinstr. 44 | | | | . \ Linux Beratung & Schulung
81667 München |_| |_|_|\_\ http://mathias-kettner.de
Tel.: 089 / 1890 4210
Fax.: 089 / 1890 4211 Mail: fh@mathias-kettner.de

There's no Xen5.5.
I assume you meant Citrix XenServer 5.5 :slight_smile:

The plugin I wrote for the MK Exchange does not support the XenServer / XCP flavors.
I have wasted many hours fixing broken XenServer installs so I don't want to touch it in my spare time at home...

That aside, it is of course possible to contract us to add support.

The adjustments, if you wanna look into it depend on how much you want to support.
For example you can just make something that produces compatible output that the Xen plugin parses.
I don't immediately remember the "xe" options for that, it should be no more than doing an xe vm list and then querying the power-state per VM.

You might also need a pre-check that finds out if you're on the right host (aka pool master).

Have a look at the bitbucket version of the Xen agent plugin. I think I had notes about XenServer in there.

http://bitbucket.org/darkfader/nagios/ and then head for check_mk, xen and then to the older versions.

A good[tm] plugin would need to go much deeper and also monitor the pool, sr, host states, but monitoring VMs is a good start and much easier since you just need some shells script that queries the VM state and gets it to output

"vm name state"

Greetings,
Florian

···

On 11/18/11 16:53, Jason Humes wrote:

Hi
We're running Xen5.5....what adjustments need to be made to the check?

--
Mathias Kettner GmbH | \/ | |/ / M A T H I A S K E T T N E R
Florian Heigl | |\/| | ' /
Steinstr. 44 | | | | . \ Linux Beratung & Schulung
81667 München |_| |_|_|\_\ http://mathias-kettner.de
Tel.: 089 / 1890 4210
Fax.: 089 / 1890 4211 Mail: fh@mathias-kettner.de

Ahh, great, thanks for clearing this up for me!

I'll share any work I do on the xenSERVER checks :slight_smile:

Thanks

Jason

···

-----Original Message-----
From: Florian Heigl [mailto:fh@mathias-kettner.de]
Sent: Friday, November 18, 2011 11:03 AM
To: Jason Humes
Cc: checkmk-en@lists.mathias-kettner.de
Subject: Re: [Check_mk (english)] Check_mk agent with xen plugin...how to enable?

On 11/18/11 16:53, Jason Humes wrote:

Hi
We're running Xen5.5....what adjustments need to be made to the check?

There's no Xen5.5.
I assume you meant Citrix XenServer 5.5 :slight_smile:

The plugin I wrote for the MK Exchange does not support the XenServer / XCP flavors.
I have wasted many hours fixing broken XenServer installs so I don't want to touch it in my spare time at home...

That aside, it is of course possible to contract us to add support.

The adjustments, if you wanna look into it depend on how much you want to support.
For example you can just make something that produces compatible output that the Xen plugin parses.
I don't immediately remember the "xe" options for that, it should be no more than doing an xe vm list and then querying the power-state per VM.

You might also need a pre-check that finds out if you're on the right host (aka pool master).

Have a look at the bitbucket version of the Xen agent plugin. I think I had notes about XenServer in there.

http://bitbucket.org/darkfader/nagios/ and then head for check_mk, xen and then to the older versions.

A good[tm] plugin would need to go much deeper and also monitor the pool, sr, host states, but monitoring VMs is a good start and much easier since you just need some shells script that queries the VM state and gets it to output

"vm name state"

Greetings,
Florian

--
Mathias Kettner GmbH | \/ | |/ / M A T H I A S K E T T N E R
Florian Heigl | |\/| | ' /
Steinstr. 44 | | | | . \ Linux Beratung & Schulung
81667 München |_| |_|_|\_\ http://mathias-kettner.de
Tel.: 089 / 1890 4210
Fax.: 089 / 1890 4211 Mail: fh@mathias-kettner.de

Great :slight_smile:
Keep us updated! (and don't try local storage caching in 5.6 btw, loses data if you snapshot :))

Florian

···

On 11/18/11 17:05, Jason Humes wrote:

Ahh, great, thanks for clearing this up for me!

I'll share any work I do on the xenSERVER checks :slight_smile:

--
Mathias Kettner GmbH | \/ | |/ / M A T H I A S K E T T N E R
Florian Heigl | |\/| | ' /
Steinstr. 44 | | | | . \ Linux Beratung & Schulung
81667 München |_| |_|_|\_\ http://mathias-kettner.de
Tel.: 089 / 1890 4210
Fax.: 089 / 1890 4211 Mail: fh@mathias-kettner.de