Metric extensions for running shell commands isn’t as straight-forward as you might hope. But it doeable.
In the Metric Extension wizard you are provided with various input fields when creating a new adapter.
To execute a shell command
- Enter the name of your shell in the Command field
- Upload a simple script file into the Script field
In this case the script consists of a single line:
ls -l /etc | grep centrifyfd | wc -l
- Simply typing the shell command in the Command field does not work
- Entering the shell in Command field and typing the command in the Script field doesn’t work either
In both cases I received errors about the ‘ls‘ utility not found (even when qualified with a path) or no permission to execute ‘ls‘.