Azure Monitoring not working with 1.6.0p20

Since update to 1.6.0p20 I get following error on Azure client:

[–timeout TIMEOUT] [–piggyback_vms {grouphost,self}]
[–subscription SUBSCRIPTIONS] --client CLIENT --tenant
TENANT --secret SECRET [–require-tag TAG]
[–require-tag-value TAG VALUE]
[–explicit-config [EXPLICIT_CONFIG [EXPLICIT_CONFIG …]]]
agent_azure: error: argument --secret is required

I applied the secret again.
I created a new config.
I created a new secret in Azure.
Nothing fixed the issue.

Have you tried running the special agent from the command line ?

Did it ever worked for you before 1.6.0p20 ?

Looks like that the parameter changed. Please run cmk --debu -vv on CLI. In the output you will find the call of the special agent. I think there is the parameter --secret missing .

Cheers,
Christian

How can I run the special agent from command line?

Yes, it worked before with 1.6.0.p19.

Hi,
switch to the site user and then jump into the directory:

share/check_mk/agents/special

From here you can run the agent:

./agent_azure

As @ChristianM mentioned: The parameter --secret is required in p20. There are some changes between p19 and p20: https://checkmk.com/werk/11694

Karl

I tried it over the cli. I got following output:
DEBUG: parse_arguments: 216: argparse: explicit_config = []
DEBUG: parse_arguments: 216: argparse: require_tag = []
DEBUG: parse_arguments: 216: argparse: verbose = 2
DEBUG: parse_arguments: 216: argparse: piggyback_vms = ‘grouphost’
DEBUG: parse_arguments: 216: argparse: client = ‘xxxxxxxxx’
DEBUG: parse_arguments: 216: argparse: dump_config = False
DEBUG: parse_arguments: 216: argparse: secret = ‘****’
DEBUG: parse_arguments: 216: argparse: sequential = False
DEBUG: parse_arguments: 216: argparse: timeout = 10
DEBUG: parse_arguments: 216: argparse: debug = True
DEBUG: parse_arguments: 216: argparse: require_tag_value = []
DEBUG: parse_arguments: 216: argparse: tenant = ‘xxxxxxxxxx’
DEBUG: parse_arguments: 216: argparse: subscription = ‘xxxxxxxxxxxx’
DEBUG: main: 732: Explicit configuration:
[]
Tag based configuration:

It stucks here.

Hi,
whats abaout the output of cmk --debug -vvII ?
Did you find the parameter “Secret” in the output?

Cheers,
Christian

I ran cmk --debug -vvII --check AzureHost.
In the output the --secret is missing.

secret is a stdin now. In order to make the script work, you have to run it like this:
echo ‘{secret=“blabla”}’ | ~/share/check_mk/agents/special/azure_agent/…

If you need to manually test it is also possible to add the “–secret” option to the special agent call.
The command line option is not removed from the special agent.

Thank you for your answers.

Now I installed the new checkmk 2.0.0b5 and the azure agent works fine again.
The only thing is, that “-” in the ressource group name is converted to “_” for the piggyback host.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact @fayepal if you think this should be re-opened.