Helping aliases

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.

How to get it

The latest version of the aliases file is available in develop branch.
See ike-aliases.sh

How to activate it

  1. Create a file in your home folder called ".bash_aliases".
  2. Paste the content of the aliases script there.
  3. Run the command "source ~/.bash_aliases" to load them right away. This only needs to be done the first time.

If you have not already done so you must put the command-runner.sh in the "$PATH".

  1. Add the line "export PATH=$PATH:<command-runner-sh location>" to the file "~/.profile".
    Replace "<command-runner-sh location>" with the location of command-runner.sh.
  2. Run "source "~/.profile" to activate it right away. This only needs to be done the first time.


How to use it

Alias name

Description

Usage

Examples

crfullRuns 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:
crfull rest-mgmt-tm-sys-version.ind 192.168.197.51

Run a command against 192.168.197.51 in verbose mode:
crfull rest-mgmt-tm-sys-version.ind 192.168.197.51 verbose

f5fullSame as crfull, but has a predefined default f5 device.f5full <script name or directory name> [device ip]

Run a command against the default device:
f5full rest-mgmt-tm-sys-version.ind

Run a command against 192.168.197.51:
f5full rest-mgmt-tm-sys-version.ind 192.168.197.51

f5fullverboseSame as f5full, but with the verbose switch.f5fullverbose <script name or directory name> [device ip]

Run a command against the default device:
f5fullverbose rest-mgmt-tm-sys-version.ind

Run a command against 192.168.197.51:
f5fullverbose rest-mgmt-tm-sys-version.ind 192.168.197.51

finddocFinds 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":
finddoc ./f5 network-interface-rx-errors

crparseTakes 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:
crparse rest-mgmt-tm-sys-version.ind rest-mgmt-tm-sys-version.input

crparseverboseSame 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
gorulesShortcut to /usr/share/indeni/rules.gorules

Enter the rules folder:
gorules

goparsersShortcut to /usr/share/indeni-collector/kb/parsers.goparsers

Enter the parsers folder:
goparsers

gooverrideShortcut to /usr/share/indeni-knowledge/overwrite/parsersgooverride

Enter the override parsers folder:
gooverride

delbyheadlineDeletes alerts with a headline matching the parameter (case sensitive).delbyheadline <alert headline>

Delete all alerts containing the string "Member":
delbyheadline Member

getlivemetricsShows 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:
getlivemetrics lb-snatpool-limit F5

Get the values for config-unsaved from the last 30 minutes from a device containing CP01:
getlivemetrics lb-snatpool-limit CP01 30

loadruleTriggers loading of a rule file in the rules folder.loadrule <rule file>

Load a rule named f5-management-restrictions.rule
loadrule f5-management-restrictions.rule