0

I have made some script that a zabbix user can run from the zabbix server.

I would like to know if it's possible to run a script (from Administration -> script) on zabbix server with filled parameters ?

For example I have the script "doSomething" in Zabbix server that launch a script localy, this script need 1 parameter that change every time. How can i do that ?

Thank you

1 Answer 1

1

From the documentation, the scripts defined in Administration -> scripts

become available for execution by clicking on the host in various frontend locations (Dashboard, Problems, Latest data, Maps)

You can supply parameters with macros:

The following macros are supported in the commands: {HOST.CONN}, {HOST.IP}, {HOST.DNS}, {HOST.HOST}, {HOST.NAME}. If a macro may resolve to a value with spaces (for example, host name), don't forget to quote as needed. Since Zabbix 2.2, user macros are supported in script commands.

You can define a user macro (ie: {$SOMEPARAM}) and use it as a param, but you need an external tool to redefine its value: it depends on what you are trying to achieve.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.