When testing your code on an indeni server there's some aliases that might help you.
Some of them might sound a bit lazy to you, but trust me, in the long run you'll save a lot of energy and time.
The latest version of the aliases file is available in develop branch.
See ike-aliases.sh
If you have not already done so you must put the command-runner.sh in the "$PATH".
Alias name | Description | Usage | Examples |
---|---|---|---|
crfull | Runs a script, or a directory of indeni scripts in full-command mode. | crfull <script name or directory name> <device ip> [verbose] | Run a command against 192.168.197.51: Run a command against 192.168.197.51 in verbose mode: |
f5full | Same as crfull, but has a predefined default f5 device. | f5full <script name or directory name> [device ip] | Run a command against the default device: Run a command against 192.168.197.51: |
f5fullverbose | Same as f5full, but with the verbose switch. | f5fullverbose <script name or directory name> [device ip] | Run a command against the default device: Run a command against 192.168.197.51: |
finddoc | Finds written documentation for a specific metric. Useful when writing the documentation part for known metrics. | finddoc <Path to search (recursive)> <metric name> | Find documentation for "network-interface-rx-errors" in "./f5": |
crparse | Takes a script file and runs command-runner in parse-only mode against an input file. | crparse <script name> <input file> | Running a script in parse-only against a specific input file: |
crparseverbose | Same as crparse, but in verbose mode. | crparseverbose <script name> <input file> | Running a script in parse-only against a specific input file: crparseverbose rest-mgmt-tm-sys-version.ind rest-mgmt-tm-sys-version.input |
gorules | Shortcut to /usr/share/indeni/rules. | gorules | Enter the rules folder: |
goparsers | Shortcut to /usr/share/indeni-collector/kb/parsers. | goparsers | Enter the parsers folder: |
gooverride | Shortcut to /usr/share/indeni-knowledge/overwrite/parsers | gooverride | Enter the override parsers folder: |
delbyheadline | Deletes alerts with a headline matching the parameter (case sensitive). | delbyheadline <alert headline> | Delete all alerts containing the string "Member": |
getlivemetrics | Shows live metric data in from the database. | getlivemetrics <metric name> <partial device name> [time frame in minutes, 1-59] | Get the lb-snatpool-limit from a device containing F5: Get the values for config-unsaved from the last 30 minutes from a device containing CP01: |
loadrule | Triggers loading of a rule file in the rules folder. | loadrule <rule file> | Load a rule named f5-management-restrictions.rule |