Custom Commands
Create monitoring dasboards on the terminal easily with a simple yaml file !
Examples
List commands
kptop --list-commands
Run command
kptop --command <DASHBOARD-NAME>
Command YAMl structure
To be added.
KPtop Custom Commands
Create monitoring command lines easily with a simple yaml file !
Examples
Command YAMl structure
variables
Take a list of variables, and optionally you can set a CLi argument for a variable
type | description | default | required | |
---|---|---|---|---|
name | String | variable name ,, also used for the CLI argument name | True | |
default | String | devault value for the variable | ||
cliArgument | Dict | CLI argument options for the variable |
cliArgument
type | description | default | required | |
---|---|---|---|---|
enable | Boolean | Enable CLI argument for the variable | True | |
short | String | short for the argument | True | |
required | Boolean | Wether the argument is required to run the command | False | False |
execute (dict)
type | description | default | required | options | |
---|---|---|---|---|---|
type | String | Data type to display on the terminal | True | advancedTable | |
advancedTableColumns | List | List of coulmns for the table, each column has its own metric | True | ||
custom_key | String | specify a custom key for metric result, You can compensate labels with “``” syntax | default labels result (string composed of summed labels .. ex. sum(metric) by (pod, namespace) | ||
advancedTableOptions | Dict | options to control how the resulted table looks |
advancedTableColumns
type | description | default | required | options | |
---|---|---|---|---|---|
COULMN NAME EX: - memory usage: | String | ||||
metric | String | Prometheus metric to qurey | |||
metricUnit | String | metric result value unit | byte | None , kb , byte , mb , gb , tb , seconds , percentage | |
autoConvertValue | Boolean | Auto convert the metric value based on the metricUnit .. for example, if metric value is in byte, it would be converted to kb, mb, gb .. etc. | False | False |
advancedTableOptions
type | description | default | required | options | |
---|---|---|---|---|---|
tableType | String | the type of table, defines how the table looks | plain | False | All the types supported here 🙂 |
headersUppercase | Boolean | True | False | ||
showTableIndex | Boolean | how table idex on the left | False | False |
List commands
kptop --list-commands
Run command
kptop --command <COMMAND-NAME>