Agent Bakery rule for deploying "citrix_farm.ps1" does not exist

Hello,

Does any body know which one is the Beakery rule for deploying the “citrix_farm.ps1”?

I was able to deploy citrix licenses plugin and citrix_xenapp.ps1 with their corresponding rules (“Citrix Licenses (Windows)” and “Citrix XenApp (Windows)” respectively) but I couldn’t find any rule to deploy “citrix_farm.ps1” plugin.

Thanks

@jorge.garcia

Just checked on my site running 2.1.0P15, there ain’t any files available for the bakery or configuring the bakery trough the GUI. So your conclusion looks valid to me.
Looking at the citrix_farm.ps1, which shows the relevant checks it’s providing data for, I did find the checks on the filesystem.

So what you can do is temporarily distribute the citrix_farm.ps1 in another way to the plugins directory on your servers.

Best to create an ticket with support to have this fixed in an future version, looks like something they should fix :slight_smile: .
In the meantime, if you need it sooner, I can help you create the two files needed, (Bakery File for the actual deploying and WATO page to be able to create the rule for deploying the ps1).
It can be done rather quickly.

Cheers,
Erik

There is also the other point to pay attention to. citrix_farm.ps1 needs an special user account to run. It is not possible to use this plugin with the default local system account.
As the needed account must be a Citrix admin account i also would not use the feature from the newer agents to run some scripts with other users.
That’s the reason why all my Citrix Delivery Controller have manual installed agents.

Hi,

First of all, I want to thank you both for the response.

@Erik, please We are knew with the Check_mk 2.0 release. I know how to create wato deploy rules in 1.6, please, I’m going to paste an example here and I kindly ask you to tell me if it is still valid in check_mk 2.0

  1. Pacage code in ./local/share/check_mk/agents/bakery/

def bake_veeam_o365(opsys, conf, conf_dir, plugins_dir):
shutil.copy2(cmk.utils.paths.local_agents_dir + “/windows/plugins/veeam_o365_status.ps1”,
plugins_dir + “/veeam_o365_status.ps1”)

bakery_info['veeam_o365'] = { 'bake_function': bake_veeam_o365, 'os': ['windows'], }

  1. WATO rule code in ./local/share/check_mk/web/plugins/wato/

`from cmk.gui.i18n import _
from cmk.gui.valuespec import (
DropdownChoice,
)
from cmk.gui.plugins.wato import (
HostRulespec,
rulespec_registry,
)

try:
from cmk.gui.cee.plugins.wato.agent_bakery import (
RulespecGroupMonitoringAgentsWindowsAgent
)
except Exception:
RulespecGroupMonitoringAgentsWindowsAgent = None

def valuespec_agent_config_veeam_o365():
return DropdownChoice(
title=
(‘Veeam for Office 365’),
help=_('This will deploy the agent plugin veeam_o365_status ’
‘for checking Veeam for Office 365 status.’),
choices=[
(True, _(‘Deploy Veeam for Office 365 plugin’)),
(None, _(‘Do not deploy Veeam for Office 365 plugin’)),
],
)

if RulespecGroupMonitoringAgentsWindowsAgent is not None:
rulespec_registry.register(
HostRulespec(
group=RulespecGroupMonitoringAgentsWindowsAgent,
name=‘agent_config:veeam_o365’,
valuespec=_valuespec_agent_config_veeam_o365,
))`

Thank you so much

@jorge.garcia

Since 2.0 there’s a new Bakery API you need to use. Use below URL for documentation after you changed it with your properties to see how the API works:

Feel free to ask questions

https://<checkmk.domainname.com>/SITENAME/check_mk/plugin-api/cmk.base.cee.plugins.bakery.bakery_api/index.html#example-bakery-plugin