Chat now with support
Chat with Support

Foglight 5.9.7 - Command-Line Reference Guide

About the Command-Line Interface Managing the Foglight Management Server Managing the Foglight Agent Manager Managing Agents, Cartridges, and Metrics

support-bundle

The support-bundle command generates an Agent Manager support bundle file. A support bundle is a compressed file that contains diagnostic data, such as Agent Manager and individual agent log files.

When you create an Agent Manager bundle, Foglight generates a ZIP files in the <foglight_home>/support/<user_name> directory on the machine on which the Management Server is running. The support bundle file name uses the following syntax:

support_bundle_FglAM_<Agent Manager host>_<Management Server host>_<user name>-<yyyy-mm-dd>-<hh-mm-ss>.zip

For example:

For details about the contents of this file, see the Administration and Configuration Help. For more information about foglight_agent_mgr_home, see Syntax Conventions .

None

 

Managing Agents, Cartridges, and Metrics

In addition to the Foglight Administration module that allows you to perform administrative tasks using the Administration dashboards, the Foglight Management Server offers a command-line interface that you can use to manage agents, cartridges and metrics. For example, you can use the command-line interface to deploy and create agents, install and activate cartridges, manage licenses, and do many other tasks.

The range and type of actions you can perform depends on the set of permissions defined by your Foglight user account.

Understanding the Command-Line Syntax

The command-line expression used to issue administrative commands on the Foglight Management Server is comprised of two commands that are separated by a colon ‘:’ and appear in the following order:

fglcmd. Logs into the Foglight Management Server and specifies the scope. It can contain two components:
Log in information, connection_options, specifies the user name and password for the Foglight Management Server. It can also contain the machine name and port number. For complete information about the specific options that you can use to specify connection information on the command line, see Logging In and Setting the Scope .
Another way of specifying connection options is using a properties file, fglcmd.properties. When configured, fglcmd uses the information in that file to retrieve connection parameters which eliminates the need to specify them on the command line each time you issue an fglcmd command. For more information, see Using a Properties File to Supply Connection Information.
The scope defines the type of commands and the target entity they are to be issued against. For example, the cartridge scope includes commands for installing and activating cartridges.The scope can be set to one of the following values:

Manages agents and agent managers

Manages cartridges

Manages licenses

Lists schedules

Runs scripts

Creates support bundles

Assigns blackout schedules

Contains utility commands

Scope-specific command. Carries out an administrative task such as a cartridge deployment or license installation, and is compatible with the scope specified with fglcmd. For a complete list of Foglight commands and their respective scope, see Looking at Scope-Specific Commands .

About Regular Expressions

A regular expression describes one or more text strings using predefined syntactic elements. Regular expressions allow you to identify a list of text entries with a single text string. A number of fglcmd commands support regular expressions. This is useful in situations when you want to issue a single command against multiple objects. For example, if you need to generate a list of all Foglight Agent Manager instances running on a set of monitored hosts, you can use a regular expression to specify the names of those hosts in a single function call.

The backslash character ‘\’ escapes a character or construct in order to process them as a literal sequence. For example, “\\” matches a single backslash while “\{” matches a left brace.

A regular expression must match the entire text string, not just a part of it. When using regular expressions to match an argument, you must specify an exact match or use wild cards. For example, if you have a host in your environment named host1.example.com that you want to match using a regular expression with the clientname argument, the outcomes of the regular expressions used as clientname arguments in the following commands are as follows:

fglcmd -usr foglight -pwd foglight -port 8080 -cmd agent:create -clientname 'host1' -type Process -name test -allclients -type Process -name test -force -regex

Error : No clients are selected by current options

fglcmd -usr foglight -pwd foglight -port 8080 -cmd agent:create-clientname 'host1.*' -type Process -name test -allclients -type Process -name test -force -regex

Agent created.

The following table lists the constructs that can be used in regular expressions and describes their usage.

The literal string contained within the construct.

In fglcmd, using a literal string in a regular expression as a command argument and enabling the command to use regular expressions causes the command to return matches that contain that text string. For example, typing mydomain.corp as a regular expression finds matches that contain that text string.

A backslash character in regular expressions can have one of the following roles:

Switch (or option). When it follows a command and is followed by an appropriate character or text string, it can provide additional input to the command.
Escape character. Signifies that the character or text string that follows should be interpreted as a literal character. For example, on the command line, the construct rm * deletes all files in the current directory while rm \* deletes only the file whose name is *.

In regular expressions, the first backslash in a double-backslash construct acts as an escape character while the second is interpreted as a literal.

For example, the construct "\\(hello world\\)" matches "\(hello world\)".

A one-digit number with a value between zero ‘0’ and seven ‘7’.

A two-digit number with each digit having a value between zero ‘0’ and seven ‘7’.

A three-digit number with the first digit having a value between zero ‘0’ and three ‘3’, and the other two digits with a value between zero ‘0’ and seven ‘7’.

A string containing a hexadecimal value of 0xhh where h is a hexadecimal digit.

A string containing a hexadecimal value of 0xhhhh where h is a hexadecimal digit.

The TAB character ('\u0009').

The line feed character ('\u000A').

The carriage return character ('\u000D').

The form feed character ('\u000C').

The alert (bell) character ('\u0007').

The ESC character ('\u001B').

The CTRL character followed by a literal.

An OR expression. Brackets can be nested. Matches one of the characters within the brackets.

For example, [xyz] matches x, y, or z.

A negative OR expression. Matches any character that is not contained within the brackets.

For example, [xyz] matches any character other than x, y, or z

A range.

For example, [a-d] matches a, b, c, and d.

A logical AND operator.

For example, [a-d]&&[m-p] matches a, b, c, d, m, n, o, and p.

Any character

Any decimal digit.

Any character other than a decimal digit.

A white space character such as a tab, line feed, blank space, or carriage return.

Any character other than tab, line feed, blank space, or carriage return.

Any lowercase or uppercase alphabetic, or a numeric character.

Any character other than lowercase or uppercase alphabetic, or a numeric character.

When following a character, the construct implies that the preceding character can appear one or zero times.

For example, each of the following constructs mean that the character X can appear once or not at all in the result:

When following a character, the construct implies that the preceding character can appear zero or more times.

For example, each of the following constructs mean that the character X can appear zero or more times in the result:

When following a character, the construct implies that the preceding character can appear one or more times.

For example, each of the following constructs mean that the character X can appear one or more times in the result:

{n}, {n}?, or {n}+

When following a character, the construct implies that the preceding character can appear exactly n times.

For example, each of the following constructs mean that the character X can appear exactly three times in the result:

{n,}, {n,}?, or {n,}+

When following a character, the construct implies that the preceding character can appear at least n times.

For example, each of the following constructs mean that the character X can appear at least five times in the result:

{n, m}, {n, m}?, or {n, m}+

When following a character, the construct implies that the preceding character can appear at least n, but no more than m times.

For example, each of the following constructs mean that the character X can appear at least four, but no more than eight times in the result:

The construct implies that both characters appear in the given order: the first one (N) is followed by the second character (M) in the result, treating the two-character construct as a literal expression. For example, the expression XY returns XY as a match.

The logical OR operator. For example, the construct X|Y mean that either X or Y can appear in the result.

Quotes all characters in the expression until it reaches \E.

For example, the construct \Qabc\E has the same meaning as "abc".

Ends the quoting started by \Q.

Parentheses are used to create capturing groups. A capturing group in a text pattern is used to match sub-strings in expressions. For example, in the construct X(Y*)Z, the capturing group (Y*) matches both Y and YY from the input, returning both XYZ and XYYZ as the result of the expression.

Capturing groups can be nested and numbered using their opening parentheses from left to right. For example, in the construct ((X(Y))(Z)), the groups are numbered as follows:

((X(Y))(Z)): group 1
(X(Y)): group 2
(Y): group 3
(Z): group 4
\n

Following a series of capturing groups, it acts as a back reference to match of the nth group.

For example, the expression ([a-d])X\1X\1 has only one capturing group whose number is one ‘1’. It returns the following matches:

(?:N)

Indicates that N is a non-capturing group in a construct.

For example, in the construct (X(?:Y))(Z), the group (?:Y) is not considered as a capturing group. The groups in the above construct are numbered as follows.

(X(?:Y))(Z): group 1
(X(?:Y)): group 2
(Z): group 3

For information about capturing groups and their syntax, see () .

(?=X)

Checks if the preceding character is followed by X in a text string, without making X a part of the search result.

For example, when the construct H(?=e) is matched against Hello world, it returns the H in the string without making the e that follows it a part of the result.

(?!X)

Checks if the preceding character is preceded by X in a text string, without making X a part of the search result.

For example, when the construct e(?!H) is matched against Hello world, it returns the e in the string without making the H that precedes it a part of the result.

Checks if the following character is followed by X in a text string, without making X a part of the search result.

For example, when the construct (?<=w)o is matched against Hello world, it returns the o in world, without making the w a part of the result, but not the o in Hello.

Returns A via zero-width positive look behind.

Checks if the following character is preceded by X, without making X a part of the search result.

For example, when the construct (?<!o)w is matched against Hello world, it returns the w in world, without making the w a part of the result.

The beginning of a line.

The end of a line.

A word boundary. Used as a delimiter, it implies that the construct between the delimiters should be matched only in those text strings that contain alpha-numeric characters and are delimited by non-word character such as spaces or punctuation marks. For example, the construct \bdog\b finds one match of dog in the string My dog is black, and no matches in My dogs are black.

A non-word boundary. Used as a delimiter, \B is the negated version of \b.

For example, the construct \Bdog\B finds a match of dog in the string My dog is black, and one in My dogs are black.

The beginning of the input. It has the same functionality as ^, with the exception that it ignores any new line characters.

The end of the previous match.

The end of the input string.It has the same functionality as $, with the exception that it ignores any final terminators.

The end of the input string.It has the same functionality as $, with the exception that it ignores any line terminators.

Any uppercase alphanumeric character.

Any lowercase alphanumeric character.

Any upper-case alphabetic character.

Any ASCII character.

Any lower-case or upper-case alphabetic character.

Any decimal digit.

Any lower-case or upper-case alphabetic character, or a numeric character.

One of the following punctuation characters:

!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~

Any alphabetic (lowercase or uppercase), numeric, or punctuation character.

Any printable alphabetic (lowercase or uppercase), numeric, or punctuation character.

A blank space or a TAB character.

A CTRL character.

A hexadecimal digit.

A white space character such as a tab, line feed, blank space, or carriage return.

NOTE: Regular expressions in Foglight follow the JavaTM guidelines for regular expressions. For complete information, you can refer to JDK documentation.
Related Documents

The document was helpful.

Select Rating

I easily found the information I needed.

Select Rating