Citrix_farm plugin setup

I am new to Check_MK Raw, running on 1.4.0p30
I attempting to perform checks of Citrix Xenapp DC, via the plugin “citrix_farm.ps1”.
But not getting any visible service-data.

After having installed in the controllers plug-in directory, and running the agent as a citrixadministrator. I am able to run on the OMD/CheckMK server:
Command:

cmk -d myXDC| grep -A1 “serverload”

Response:

<<<citrix_serverload>>>
160


Also the WATO host diagnostic test, shows data:
image
But I can see no active services discovered on the host.
As another attempt, I have added Manual checks “Citrix Serverload” and “Citrix Total Sessions”, but they fail, and appear to refer to another Check plugin(?)

Can anyone guide me further?

Best regards, Rasmus

Please submit the result of a cmk -D HOST.

Thanks for your response.

But is there any way of not posting the entire output? I would expect to have to anonymize the output somewhat before publishing it.
As noted in my original sample, the cmk command includes <<<citrix_serverload>>> and <<<citrix_sessions>>>

Brgds, Rasmus

Actually I just wanted to 1) know if there are other services which work correctly and 2) ask if the IP, stated behind “Addresses” of cmk -D actually is the correct IP of the host you want to check.

Because this error looks like the cmk server is establishing a connection to wrong target, where the citrix info is missing in the agent output.

To double check: on the cmk server, run a cmk -d IP-Address and check if the citrix portion is present.

Great, also the complete output would be 2100+ lines :smile:

When I do cmk -d IP-Address | grep -A1 “serverload” , I get:
<<<citrix_serverload>>>
40

<<<citrix_serverload>>>
240

<<<citrix_serverload>>>
40

<<<citrix_serverload>>>
200

<<<citrix_serverload>>>
160

<<<citrix_serverload>>>
160

<<<citrix_serverload>>>
160

<<<citrix_serverload>>>
200

<<<citrix_serverload>>>
160

So the serverload is reported back, both using hostname and ip-address.

And (forgot to metion), the regular Agent services are reported normally.

Brgds, Rasmus

Do you really get multiple <<<citrix_serverload>>> sections in your output? That seems strange. And the hyphen also doesn’t look like it belongs there.

You should try to fake the output to see if the problem is on server or host side. Do this:

Remove the citrix_farm plugin form the plugin dir on the host. Create a .bat file with this content:

@echo off
echo ^<^<^<citrix_serverload^>^>^>
echo 100

Then, run an inventory on the host and see if it creates the serverload service correctly.

Yes, I do get several <<<citrix_serverload>>>, and I actually believe it makes sense :smile: . Because I have several Citrix servers within the farm, and they each have different loadvalues.
The hyphen is created by grep to divide the grouped matches.

I admit, I do not know how 1 host/agent on CheckMK would report this dynamic number of citrix_serverloads - but I had hoped to be wiser when I saw the actual status.

Following your suggestion with a single value from the agent, the value is reported, and accepted:
image

My understanding was that the plugin was expected to be installed on a XenDesktop Controller, to report the load on a number of machines (the plugin script notes a default of maximum 500 machines)

So, the connectivity seems OK, but my understanding of the plugin is still lacking :blush:

Brgds, Rasmus

Ohhh now I got it. I had a look at the plugin code and I got enlightened. Posting the full output of the citrix portions of the agent output would have been better to see earlier what is going on. :sweat_smile:

The plugin uses the piggyback function. This means this one host gathers info for other hosts in your cmk system. You can tell it is piggyback info by the additional headers in the agent output:

<<<<machine_1>>>>
<<<citrix_stuff>>>
bla
<<<citrix_stuff>>>
bli
<<<citrix_stuff>>>
blub
<<<<>>>>
<<<<machine_2>>>>
<<<citrix_stuff>>>
bla
<<<citrix_stuff>>>
bli
<<<citrix_stuff>>>
blub
<<<<>>>>

So this piggyback info is saved and used only for the hosts which are stated in the piggyback header <<<<machine_1>>>> not for the host the plugin is running on. If you don’t have these hosts in your cmk, you will never see any new services anywhere. Also, make sure the names your citrix controller is reporting are the same (case sensitive, if I am not mistaken) in cmk. If you already have these hosts in cmk, but with different names, you can map these names via WATO rule (Access to agents -> hostname translation for piggybacked hosts).

Thanks, that was the key for my understanding!

In an attempt to to describe the method that I should have done:

  • Install the “citrix_farm.ps1” as a plugin for the CheckMK agent, on the XenDesktop Controller/XCD, running as user with Citrix administrative privileges.
  • Create a set of hosts, using Host tags -> Host type=No Agent

This allows monitoring for the set of hosts, of values like Citrix Serverload and Citrix Sessions

Brgds, Rasmus

1 Like