Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Bob_Zimmerman
MVP Gold
MVP Gold

Skyline on ElasticXL

I have a relatively simple Skyline config for my personal ElasticXL lab (R82 jumbo 122 in a 2x2 cluster):

[Expert@DallasticXL-s01-01:0]# cat /home/admin/payload.json
{
	"enabled": true,
	"export-targets": {
		"rebase": [
			{
				"enabled": true,
				"name": "internal",
				"type": "prometheus-remote-write",
				"url": "http://10.0.3.23:30104/api/v1/write"
			}
		]
	}
}

[Expert@DallasticXL-s01-01:0]# jq -c . /home/admin/payload.json
{"enabled":true,"export-targets":{"rebase":[{"enabled":true,"name":"internal","type":"prometheus-remote-write","url":"http://10.0.3.23:30104/api/v1/write"}]}}

I go to the Skyline Administration Guide's directions for "Step 4 - Configure the OpenTelemetry Collector on the Check Point Server to work with the Prometheus Server" > "Procedure to work with an on-premises Prometheus Server" > "Run the configuration command to apply the payload", and it says to run this for a Scalable Platform Security Group:

g_all sklnctl export --set "$(cat /home/admin/payload.json)"

But when I run it, it definitely doesn't work:

[Expert@DallasticXL-s01-01:0]# g_all sklnctl export --set "$(cat /home/admin/payload.json)"
sklnctl export --set {{
	"enabled": true,
	"export-targets": {
		"rebase": [
			{
				"enabled": true,
				"name": "internal",
				"type": "prometheus-remote-write",
				"url": "http://10.0.3.23:30104/api/v1/write"
			}
		]
	}
}}: command not found

[Expert@DallasticXL-s01-01:0]# g_all sklnctl export --set "$(jq -c . /home/admin/payload.json)"
sklnctl export --set {{"enabled":true,"export-targets":{"rebase":[{"enabled":true,"name":"internal","type":"prometheus-remote-write","url":"http://10.0.3.23:30104/api/v1/write"}]}}}: command not found

It's obviously running the command substitution before running the g_all, so I also tried this to get it to pass the command verbatim to the other members:

[Expert@DallasticXL-s01-01:0]# g_all sklnctl export --set "\$(jq -c . /home/admin/payload.json)"
1_01:
Error: invalid character '{' looking for beginning of object key string
1_02:
Error: invalid character '{' looking for beginning of object key string
2_01:
Error: invalid character '{' looking for beginning of object key string
2_02:
Error: invalid character '{' looking for beginning of object key string

[Expert@DallasticXL-s01-01:0]# g_all sklnctl export --set '$(jq -c . /home/admin/payload.json)'
1_01:
Error: invalid character '{' looking for beginning of object key string
1_02:
Error: invalid character '{' looking for beginning of object key string
2_01:
Error: invalid character '{' looking for beginning of object key string
2_02:
Error: invalid character '{' looking for beginning of object key string

For now, I can just move to each member and run the 'sklnctl export --set "$(cat /home/admin/payload.json)"' command by hand. It's just annoying.

Since the command in the documentation doesn't work, how should this be done using g_all?

0 Kudos
0 Replies
Upcoming Events

    CheckMates Events