You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provides functionality for scrape configurations in Argus
4
+
5
+
### Synopsis
6
+
7
+
Provides functionality for scrape configurations in Argus.
8
+
9
+
```
10
+
stackit argus scrape-config [flags]
11
+
```
12
+
13
+
### Options
14
+
15
+
```
16
+
-h, --help Help for "stackit argus scrape-config"
17
+
```
18
+
19
+
### Options inherited from parent commands
20
+
21
+
```
22
+
-y, --assume-yes If set, skips all confirmation prompts
23
+
--async If set, runs the command asynchronously
24
+
-o, --output-format string Output format, one of ["json" "pretty"]
25
+
-p, --project-id string Project ID
26
+
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
27
+
```
28
+
29
+
### SEE ALSO
30
+
31
+
*[stackit argus](./stackit_argus.md) - Provides functionality for Argus
32
+
*[stackit argus scrape-config create](./stackit_argus_scrape-config_create.md) - Creates a scrape configuration for an Argus instance
33
+
*[stackit argus scrape-config delete](./stackit_argus_scrape-config_delete.md) - Deletes a scrape configuration from an Argus instance
34
+
*[stackit argus scrape-config generate-payload](./stackit_argus_scrape-config_generate-payload.md) - Generates a payload to create/update scrape configurations for an Argus instance
Creates a scrape configuration for an Argus instance
4
4
5
5
### Synopsis
6
6
7
-
Creates a Scrape Config job for an Argus instance.
7
+
Creates a scrape configuration job for an Argus instance.
8
8
The payload can be provided as a JSON string or a file path prefixed with "@".
9
9
If no payload is provided, a default payload will be used.
10
10
See https://docs.api.stackit.cloud/documentation/argus/version/v1#tag/scrape-config/operation/v1_projects_instances_scrapeconfigs_create for information regarding the payload structure.
11
11
12
12
```
13
-
stackit argus scrape-configs create [flags]
13
+
stackit argus scrape-config create [flags]
14
14
```
15
15
16
16
### Examples
17
17
18
18
```
19
-
Create a Scrape Config job on Argus instance "xxx" using default configuration
20
-
$ stackit argus scrape-configs create
19
+
Create a scrape configuration on Argus instance "xxx" using default configuration
20
+
$ stackit argus scrape-config create
21
21
22
-
Create a Scrape Config job on Argus instance "xxx" using an API payload sourced from the file "./payload.json"
-h, --help Help for "stackit argus scrape-configs create"
37
+
-h, --help Help for "stackit argus scrape-config create"
38
38
--instance-id string Instance ID
39
-
--payload string Request payload (JSON). Can be a string or a file path, if prefixed with "@" (example: @./payload.json). If unset, will use a default payload (you can check it by running "stackit argus scrape-configs generate-payload")
39
+
--payload string Request payload (JSON). Can be a string or a file path, if prefixed with "@" (example: @./payload.json). If unset, will use a default payload (you can check it by running "stackit argus scrape-config generate-payload")
Generates a payload to create/update Scrape Configurations for an Argus instance
3
+
Generates a payload to create/update scrape configurations for an Argus instance
4
4
5
5
### Synopsis
6
6
7
-
Generates a JSON payload with values to be used as --payload input for Scrape Configurations creation or update.
8
-
This command can be used to generate a payload to update an existing Scrape Config job or to create a new Scrape Config job.
9
-
To update an existing Scrape Config job, provide the job name and the instance ID of the Argus instance.
10
-
To obtain a default payload to create a new Scrape Config job, run the command with no flags.
7
+
Generates a JSON payload with values to be used as --payload input for scrape configurations creation or update.
8
+
This command can be used to generate a payload to update an existing scrape config or to create a new scrape config job.
9
+
To update an existing scrape config job, provide the job name and the instance ID of the Argus instance.
10
+
To obtain a default payload to create a new scrape config job, run the command with no flags.
11
11
Note that some of the default values provided, such as the job name, the metrics path and URL of the targets, should be adapted to your use case.
12
12
See https://docs.api.stackit.cloud/documentation/argus/version/v1#tag/scrape-config/operation/v1_projects_instances_scrapeconfigs_create for information regarding the payload structure.
Generate an Update payload with the values of an existing configuration named "my-config" for Argus instance xxx, and adapt it with custom values for the different configuration options
-h, --help Help for "stackit argus scrape-configs generate-payload"
36
+
-h, --help Help for "stackit argus scrape-config generate-payload"
37
37
--instance-id string Instance ID
38
38
-n, --job-name string If set, generates an update payload with the current state of the given scrape config. If unset, generates a create payload with default values
Copy file name to clipboardExpand all lines: internal/cmd/argus/scrape-config/create/create.go
+15-15Lines changed: 15 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -34,29 +34,29 @@ type inputModel struct {
34
34
funcNewCmd(p*print.Printer) *cobra.Command {
35
35
cmd:=&cobra.Command{
36
36
Use: "create",
37
-
Short: "Creates a Scrape Config job for an Argus instance",
37
+
Short: "Creates a scrape configuration for an Argus instance",
38
38
Long: fmt.Sprintf("%s\n%s\n%s\n%s",
39
-
"Creates a Scrape Config job for an Argus instance.",
39
+
"Creates a scrape configuration job for an Argus instance.",
40
40
"The payload can be provided as a JSON string or a file path prefixed with \"@\".",
41
41
"If no payload is provided, a default payload will be used.",
42
42
"See https://docs.api.stackit.cloud/documentation/argus/version/v1#tag/scrape-config/operation/v1_projects_instances_scrapeconfigs_create for information regarding the payload structure.",
43
43
),
44
44
Args: args.NoArgs,
45
45
Example: examples.Build(
46
46
examples.NewExample(
47
-
`Create a Scrape Config job on Argus instance "xxx" using default configuration`,
48
-
"$ stackit argus scrape-configs create"),
47
+
`Create a scrape configuration on Argus instance "xxx" using default configuration`,
48
+
"$ stackit argus scrape-config create"),
49
49
examples.NewExample(
50
-
`Create a Scrape Config job on Argus instance "xxx" using an API payload sourced from the file "./payload.json"`,
cmd.Flags().Var(flags.ReadFromFileFlag(), payloadFlag, `Request payload (JSON). Can be a string or a file path, if prefixed with "@" (example: @./payload.json). If unset, will use a default payload (you can check it by running "stackit argus scrape-configs generate-payload")`)
129
+
cmd.Flags().Var(flags.ReadFromFileFlag(), payloadFlag, `Request payload (JSON). Can be a string or a file path, if prefixed with "@" (example: @./payload.json). If unset, will use a default payload (you can check it by running "stackit argus scrape-config generate-payload")`)
0 commit comments