Skip to content

Publish-IcingaForWindowsComponent - Error message "too long argument" is confusing #579

@stevie-sy

Description

@stevie-sy

I rewrite our own check module for the framework 1.10.0. For creating I used the cmdlet New-IcingaForWindowsComponent like mentioned in the docs. Now I'm finished and I used Publish-IcingaForWindowsComponent to create the ZIP-file for our internal repo.

My function is called Invoke-IcingaCheckExchangeWebServicesOOE and a Switch-Paramter is called IgnoreCategorizedMails

During calling the Cmdlet I get for this following error
[Error]: The argument "IgnoreCategorizedMails" for the plugin "Invoke-IcingaCheckExchangeWebServicesOOE" is too long. The maximum size of generated custom variables is 64 di
gits. Current argument size: "72", Name: "IcingaCheckExchangeWebServicesOOE_Switchparameter_IgnoreCategorizedMails".

If you read the first part of the message you're a little bit confused about the error message. Because both the function name and the parameter name have fewer than the specified characters. That the error message talks about the concated string for internal handling is not apparent at first glance. One can only guess, because in the output is also written the concated name.

And as a result the JSON-file for the director import is of course not exported. But this doesn't matter, because manually creating the command works fine. Because i know the concated string is only for field creation. And here you can short the field name.

Maybe you can optimize the error message? Or specify a maximal chars for a the function and/or parameter.

Metadata

Metadata

Assignees

Labels

EnhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions