cells-enterprise admin license-stats
./cells-enterprise admin license-stats
Load current license statistics
Synopsis
DESCRIPTION
Query running Cells instance to load license statistics. Without arguments, it will output license statistics
TEMPLATING
Using the --format flag allows you to create your own output using Golang templating. Input data is { ActiveUsers:int MaxUsers:int UsersPercent:int ExpireTime:timestamp ExpireDate:string ExpireIn:seconds } You can for example display a simple percentage using {{.UsersPercent}}% template.
You can use conditions to return an error signal (1) for special cases, by printing the specific ERROR_CODE keyword.
For example:
Return error if users usage is greater than 90% $ ./cells-enterprise admin license-stats --format="{{if gt .UsersPercent 90}}ERROR_CODE{{end}}"
Return error if license will expire in less than 3 days (518400 seconds) $ ./cells-enterprise admin license-stats --format="{{if lt .ExpireIn 518400}}ERROR_CODE{{end}}"
./cells-enterprise admin license-stats [flags]
Options
-f, --format string Use golang template to compute your own output
-h, --help help for license-stats
-r, --refresh Force users computation to be refresh, this can take some time
Options inherited from parent commands
--broker string Pub/sub service for events between services (currently nats only) (default "nats")
--broker_address string Nats broker port (default ":4222")
--registry_address string Registry connection address (default ":4222")
--registry_cluster_address string Registry cluster address
--registry_cluster_routes string Registry cluster routes
--transport string Transport protocol for RPC (default "grpc")
--transport_address string Transport protocol port (default ":4222")
SEE ALSO
- ./cells-enterprise admin - Direct Read/Write access to Cells data