2.2.34 systeminsight

usage: systeminsight 
profile create -folder <folder name> -name <profile name> -desc, --description <description of profile> -r, --retentionPolicy <retention policy> | 
remove [-f, --force] -profile <qualified profile name> | 
addFilter [-f, --force] -profile <qualified profile name> -e, --regularExpression <"regular expression">, [-t, --tagRegularExpressions <tag value regular expression>] | 
removeFilter -profile <qualified profile name> -id <filter id> | 
disable <qualified profile name> | 
enable <qualified profile name> | 
list -profile <qualified profile name> [-j,--json]

usage: systeminsight metrics [-j, --json], [-m, --metric <metric name>], [-t, --tag <tag name>]

usage: systeminsight retentionPolicy list [ -j, --json ]

usage: systeminsight test [-n, --name <name of metric>] | [-t, --tags <tag name and value pairs>]

This command enables you to manage a System Insight metrics, by adding and removing profiles and filters for the metrics that you want to produce. You can also use the command to list the metrics available on the running system on which you can apply filters, to list the retention policies in place, and test which filters there are for a metric.

The systeminsight command has four subcommands: profile, metricsretentionPolicy and test

profile

To use System Insight, you must determine the profile that you want to apply, which you configure using the systeminsight profile command. The subcommands described below enable you to manage a profile.

Note!

The System Insight service must be running before you create, modify or remove a profile. You start the service using the command mzsh service start. For information on how to configure System Insight services, see 2.2.1 Configure System Insight Services.

create

Use systeminsight profile create to create a System Insight profile. To create a profile, you must specify the folder in which you want to save the profile, the profile name, a description of the profile, and the retention policy for the profile.

The command accepts the following options:

OptionDescription
-folder <name of folder>Provide the name of the folder where you want to save the profile.

-name <name of profile>

Provide a unique name for the profile.
-desc, --description <description of profile>Provide a description of the profile.
-r,  --retentionPolicy <retention policy>Use this option to specify the retention policy for the profile.
-enabledUse this option to set the profile to enabled status so that you can use the filters in the profile. If a profile is not set to enabled, you cannot use the filters it contains to produce the required statistics.

Example of how to create a System Insight profile

systeminsight profile create -folder Default -name siprofile1 -desc siprofile1 -r one_month -enabled

Note!

After you have created a profile, the qualified profile name that is thereafter required when you use the systeminsight command to manage the profile consists of the folder name + the unique profile name: <folder name>.<profile name>, e g Default.siprofile1.

remove

Use systeminsight profile remove to delete a specific System Insight profile.

The command accepts the following options:

OptionDesription
-profile <qualified name of profile>Provide the qualified name of the profile that you want to delete.
[-f, --force]Use this option to forcibly remove a profile.

addFilter

Use systeminsight profile addFilter to add a filter to the filter list. To add a filter, you must specify the qualified profile name of the profile to which you want to add the filter, and the regular expression that you want to include in the filter. You can also add the tag value regular expressions that you want to include.

The command accepts the following options:

OptionDescription
-profile <qualified name of profile>Provide the qualified name of the profile to which you want to add the filter.
-e, --regularExpression "<regular expression>"

Provide the regular expression that you want to include in the filter, with quotation marks. A regular expression must begin with one of the following: pico, host, mim, service or custom, followed by ".", for example, "host\.xyz".

[-f, --force]Use this option when the regular expression that you want to add does not begin with one of the following pico, host, mim, service or custom, followed by ".". For example a filter definition that would allow anything containing ".kafka.", ".*\.kafka\..*".
-t, --tagRegularExpressions "<tag value regular expression>"Provide the regular expressions for tag values. For example, "host_name=myhost[0-9]*".

When you use this command to create a filter, it is given a filter id, determined by the numeric order of when the filter is created: the first filter is given filter id 1, the second id given filter id 2 etc.

Examples of how to add a filter

A simple rule:

systeminsight profile addFilter -profile Default.siprofile1 -e "host\.comp3\.comp3"

A rule which requires forced addition:

systeminsight profile addFilter -f -profile Default.siprofile1 -e ".*pico\.comp1\.comp1"

Example of a filter including tag value reglar expressions:

systeminsight profile addFilter -profile Default.siprofile1 -e "pico\..*" -t "host_name=myhost[0-9]*"

removeFilter

Use systeminsight profile removeFilter to delete a filter from the filter list in a profile. You must specify the profile that contains the filter, and the filter that you want to delete.

The command accepts the following options:

OptionDescription
-profile <qualified name of profile>Specify the qualified name of the profile that contains the filter that you want to delete.
-id <filter id>Specify the filter that you want to delete.

disable

Use systeminsight profile disable to set a profile to disabled status. You must provide the qualified name of the profile that you want to disable.

enable

Use systeminsight profile enable to set a profile to enabled status. You must provide the qualified name of the profile that you want to enable. If a profile is not set to enabled, you cannot use the filters it contains to produce the required statistics.

list

Use systeminsight profile list to list all the profiles, or to list all the filters that have been added for a specific profile. You are also provided with the retention policy that applies to each profile and whether the profile is enabled or disabled.

Note!

The System Insight service must be running for InfluxDB retention policies to be included in the profile listing. You start the service using the command mzsh service start. For information on how to configure System Insight services, see 2.2.1 Configure System Insight Services.

The command accepts the following option:

OptionDescription
-profile <qualified name of profile>Specify the qualified name of the profile that contains the filters.
[-j, --json]Use this option if you want to print the filters in json output format.

metrics

Use systeminsight metrics to list all of the metrics available on the running system, to which you can apply a filter in order to produce statistics using System Insight. Each metric is listed with the available tags and tag values.

The command accepts the following option:

OptionDescription
[-j, --json]Use this option if you want to print the metrics in json output format.
[-m, --metric]

Use this option if you want to refine the result based on the metric name as a regular expression. For example, if you want to see all the metrics with pico in the name:

systeminsight metrics -m "pico.*"
[-t, --tag]

Use this option if you want to refine the result based on the tag name as a regular expression. For example, if you want to see all the tags with host in the name:

systeminsight metrics -t "host.*"

The list of metrics displayed alphanumerically with the relevant tags and tag values depends on the running system. The following metrics, with the relevant tags always appear by default after you have created a profile. Since the tag values depend on your setup, the values listed below are examples.


MetricsTagsTag Values
host.computehost_name<"host name">
reporting_pico<"ec1", "platform", "psc1", "sc1">
reporting_pico_type
<"ec", "platform", "sc">
host.network host_name<"host name">
nic<"awdl0", "bridge0", "en0", "en1", "en2", "en3", "lo0", "p2p0">
reporting_pico<"ec1", "platform", "psc1", "sc1">
reporting_pico_type
<"ec", "platform", "sc">
host.storage.iostats host_name<"host name">
mount_dir<"/">
reporting_pico<"ec1", "platform", "psc1", "sc1">
reporting_pico_type
<"ec", "platform", "sc">
host.storage.swaphost_name<"host name">
reporting_pico<"ec1", "platform", "psc1", "sc1">
reporting_pico_type<"ec", "platform", "sc">
host.storage.usage host_name<"host name">
mount_dir<"/", "/dev">
reporting_pico<"ec1", "platform", "psc1", "sc1">
reporting_pico_type
<"ec", "platform", "sc">
pico.events event_type<"Code insertion", "Code removal">
title
<"Code Server Package Event">
pico.jvm host_name<"host name">
pico_instance<"ec1", "platform", "sc_si1">
service.akka.router.receiveractor_system<"si">
host_name<"host name">
pico_instance<"ec1", "platform", "sc_si1">
service.akka.router.senderactor_system
<"si">
host_name
<"host name">
pico_instance
<"ec1">
service.systeminsight.dispatcheractor_system
<"si">
host_name
<"host name">
pico_instance <"sc_si1">

As the output displayed when you use this command depends on the running system, the metrics available for the workflows which you are running based on the relevant MIMs are also listed.

Example - MIM metrics based on a running workflow

If you have a workflow with a Workflow Bridge processing agent, the metrics available may look as follows:

MetricsTagsTag Values
mim.realtime.processing.workflow_bridge agent_category<"processing">
agent_name<"Workflow_Bridge_1">
host_name<"host name">
pico_instance<"ec1">
workflow_folder<"Default">
workflow_instance<"wf">
workflow_name<"fwd">
workflow_type<"realtime">

retentionPolicy

You can also list the retention policies.

Note!

The System Insight service must be running before the systeminsight retentionPolicy command is available. You start the service using the command mzsh service start. For information on how to configure System Insight services, see 2.2.1 Configure System Insight Services.

list

Use systeminsight retentionPolicy list to list all the retention policies in place.

The command accepts the following option:

OptionDescription
[ -j, --json ]Use this option if you want to print the list in json output format.

Example of retention policy list

systeminsight  retentionPolicy  list
Name           Duration
one_month      720h
one_day        24h
one_week       168h (Default)
three_months   2160h
one_year       8760h
ten_years      87600h
three_hours    3h

test

Use systeminsight test to get a list of the filters for a metric. Specifying a tag refines the metric, and is optional.

The command accepts the following options:

OptionDescription
-n, --name "<name of metric>"Provide the name of the metric for which you want to list the filters.
-t, --tags <tag name and tag value pairs>You can provide the tag name and tag value pair(s) for which you want to list the filters.

Examples of how to test which filters match a metric

If you have the following four filters in place:

FilteridRegular expressionTag Regular Expression
1custom\.system
2custom\.systemtag1=a.*
3custom\.systemtag1=a.*, tag2=b.*
4custom\.systemtag1=a.*, tag2=b.*, tag3=c.*

Example 1

If you test which filters match the metric name "custom.system" by entering the following:

systeminsight test -n custom.system

The output is as follows:


Profile: Default.siprofile1
FilterId      RegularExpression    Tag RegularExpressions         
1             custom\.system       Map()       
2             custom\.system       Map(tag1=a.*)       
3             custom\.system       Map(tag1=a.*, tag2=b.*)       
4             custom\.system       Map(tag1=a.*, tag2=b.*, tag3=c.*)       


Example 2

If you test which filters match the metric name "custom.system" and the tag name and tag value pair tag1=aaa by entering the following:

systeminsight test -n custom.system -t tag1=aaa

The output is as follows:

Profile: Default.siprofile1
FilterId      RegularExpression    Tag RegularExpressions    
1             custom\.system       Map()       
2             custom\.system       Map(tag1=a.*)       


Example 3

If you test which filters match the metric name "custom.system" and the tag name and tag value pairs tag1=aaa and tag2=bbb, by entering the following:

systeminsight test -n custom.system-t tag1=aaa tag2=bbb

The output is as follows:

Profile: Default.siprofile1
FilterId      RegularExpression    Tag RegularExpressions   
1             custom\.system       Map()       
2             custom\.system       Map(tag1=a.*)       
3             custom\.system       Map(tag1=a.*, tag2=b.*)       


Example 4

If you test which filters match the metric name "custom.system" and the tag name and tag value pairs tag1=aaa, tag2=bbb and tag3=ccc, by entering the following:

systeminsight test -n custom.system-t tag1=aaa tag2=bbb tag3=ccc

The output is as follows:

Profile: Default.siprofile1
FilterId     RegularExpression    Tag RegularExpressions   
1            custom\.system       Map()       
2            custom\.system       Map(tag1=a.*)       
3            custom\.system       Map(tag1=a.*, tag2=b.*)       
4            custom\.system       Map(tag1=a.*, tag2=b.*, tag3=c.*)       

Return Codes

Listed below are the different return codes for the systeminsight command:

CodeDescription

0

Will be returned if the command was successful. 

1

Will be returned when a general error occurs.

2

Will be returned if an unknown error occurs.

7Will be returned if you are not on the Platform when you execute the command.
10

Will be returned if the parameters are incorrect.