AutoPatrol, Bureaucrats, Administrators
481
edits
m (→Verify) |
(Syntax highlighter fixed) |
||
Line 4: | Line 4: | ||
Script should print one or more "Parameter=Value" pairs to standard output. Multiple pairs should be separated by new line. If parameter takes argument, it should be included in "Parameter(...)".<br />Example (shell script): | Script should print one or more "Parameter=Value" pairs to standard output. Multiple pairs should be separated by new line. If parameter takes argument, it should be included in "Parameter(...)".<br />Example (shell script): | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="bash"> | ||
#!/bin/sh | #!/bin/sh | ||
Line 14: | Line 14: | ||
== Agent configuration == | == Agent configuration == | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="ini"> | ||
ExternalParametersProvider=PATH_TO_PROVIDER_SCRIPT:POLL_TIME_IN_SECONDS | ExternalParametersProvider=PATH_TO_PROVIDER_SCRIPT:POLL_TIME_IN_SECONDS | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Example (run /tmp/test.sh every 5 seconds): | Example (run /tmp/test.sh every 5 seconds): | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="ini"> | ||
ExternalParametersProvider=/tmp/test.sh:5 | ExternalParametersProvider=/tmp/test.sh:5 | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 25: | Line 25: | ||
== Verify == | == Verify == | ||
You can check that everything is working fine by listing supported parameters from the agent: | You can check that everything is working fine by listing supported parameters from the agent: | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="html4strict"> | ||
Alexs-MacBook-Air:~ alk$ /opt/netxms/bin/nxget -I localhost | Alexs-MacBook-Air:~ alk$ /opt/netxms/bin/nxget -I localhost | ||
Agent.AcceptedConnections UINT "Number of connections accepted by agent" | Agent.AcceptedConnections UINT "Number of connections accepted by agent" | ||
Line 37: | Line 37: | ||
Get value for specific parameter: | Get value for specific parameter: | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="html4strict"> | ||
Alexs-MacBook-Air:~ alk$ /opt/netxms/bin/nxget localhost 'ParameterWithArgs(AAA)' | Alexs-MacBook-Air:~ alk$ /opt/netxms/bin/nxget localhost 'ParameterWithArgs(AAA)' | ||
Value3 | Value3 | ||
</syntaxhighlight> | </syntaxhighlight> |