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

 typedescriptiondefaultrequired
nameStringvariable name ,, also used for the CLI argument name True
default
Stringdevault value for the variable 
cliArgument
DictCLI argument options for the variable
 

cliArgument

 typedescriptiondefaultrequired
enableBooleanEnable CLI argument for the variable True
short
Stringshort for the argument True
required
BooleanWether the argument is required to run the commandFalseFalse

execute (dict)

 typedescriptiondefaultrequiredoptions
typeStringData type to display on the terminal TrueadvancedTable
advancedTableColumnsListList of coulmns for the table, each column has its own metric True 
custom_keyStringspecify a custom key for metric result, You can compensate labels with “``” syntaxdefault labels result (string composed of summed labels .. ex. sum(metric) by (pod, namespace)  
advancedTableOptionsDictoptions to control how the resulted table looks   

advancedTableColumns

 typedescriptiondefaultrequiredoptions
COULMN NAME
EX: - memory usage:
String
 

metricString
Prometheus metric to qurey 
 
metricUnit
String
metric result value unitbyte 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.FalseFalse 

advancedTableOptions

 typedescriptiondefaultrequiredoptions
tableTypeStringthe type of table, defines how the table looksplainFalseAll the types supported here 🙂
headersUppercase
Boolean
TrueFalse 
showTableIndex
Boolean
how table idex on the leftFalseFalse 




List commands

kptop --list-commands

Run command

kptop --command <COMMAND-NAME>

Table of contents