-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.txt
46 lines (32 loc) · 3.49 KB
/
test.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# send logs from log server to distributor running locally
ssh -R 8998:localhost:8998 -L 3306:localhost:3306 eblog-server
ssh -L 8001:localhost:8000 -L 8088:localhost:8088 eblog-client
# Init
insert into domain(domain) VALUES("development");
insert into domain(domain) VALUES("production");
insert into domain(domain) VALUES("gb_cam_dactyl");
insert into ebhost(host_address, host_name, domain_id, supports_sync) VALUES('site2.enigmabridge.com', 'dragonfly', 1, 1);
insert into ebhost(host_address, host_name, domain_id, supports_sync) VALUES('site1.enigmabridge.com', 'damselfly', 3, 1);
# Initial setup for internal testing client.
curl --insecure -H "Content-Type:application/json" -H 'X-Auth-Token: a' 'https://localhost:8444/api/v1/client/add' -d '{"clients":[{"clientId":"API_TEST", "domain":"development", "splunkConfig": {"endpoint":"https://127.0.0.1:8088", "token": "4FBE1D2F-354D-4947-BA1F-3629CB5F04AF", "caRoots": "", "verifyTls":false}, "objects":[], "apiKeys":["API_TEST"]}]}'
curl --insecure -H "Content-Type:application/json" -H 'X-Auth-Token: a' 'https://localhost:8444/api/v1/client/add' -d '{"clients":[{"clientId":"API_TEST", "domain":"gb_cam_dactyl", "splunkConfig": {"endpoint":"https://127.0.0.1:8088", "token": "4FBE1D2F-354D-4947-BA1F-3629CB5F04AF", "caRoots": "", "verifyTls":false}, "objects":[], "apiKeys":["API_TEST"]}]}'
# Set the clients - old ones with given client ID will be removed
curl --insecure -H "Content-Type:application/json" -H 'X-Auth-Token: a' 'https://localhost:8444/api/v1/client/add' -d '{"clients":[{"clientId":"API_TEST", "splunkConfig": {"endpoint":"tcp://127.0.0.1:4000", "token": "abc", "caRoots": "---pem---", "verifyTls":true}, "objects":[{"apiKey":"API_TEST","uoType":12,"uoId":123},{"apiKey":"API_TEST","uoType":12,"uoId":321}]}]}'
# Configuration from business server
curl --insecure -H "Content-Type:application/json" -H 'X-Auth-Token: a' 'https://localhost:8444/api/v1/client/business/configure' -d '{"clients":[{"clientid":"TEST","enabled":2,"clientapis":{"API_TEST":{"apikey":"API_TEST","use":[1,2,3],"enabled":2,"manage":[], "domain":"development"}}}]}'
# dump current database
curl --insecure -H 'X-Auth-Token: a' 'https://localhost:8444/api/v1/client/list'
# show current statistics
curl --insecure -H 'X-Auth-Token: a' 'https://localhost:8444/api/v1/stats'
# reload current settings - lazy, connectors reload only if config changes
curl --insecure -H 'X-Auth-Token: a' 'https://localhost:8444/api/v1/reload'
# reload current settings - eager. Reconnect.
curl --insecure -H 'X-Auth-Token: a' 'https://localhost:8444/api/v1/reload?lazy=false'
# add UO to existing user
curl --insecure -H "Content-Type:application/json" -H 'X-Auth-Token: a' 'https://localhost:8444/api/v1/client/addObject/TEST/development' -d '{"apiKey":"API_TEST","uoType":12,"uoId":321}'
# add UO automatically
curl --insecure -H "Content-Type:application/json" -H 'X-Auth-Token: a' 'https://localhost:8444/api/v1/client/addObject' -d '{"apiKey":"API_TEST","uoType":12,"uoId":321}'
# removing UO from existing user
curl --insecure -H "Content-Type:application/json" -H 'X-Auth-Token: a' 'https://localhost:8444/api/v1/client/removeObject/TEST/development' -d '{"apiKey":"API_TEST","uoType":12,"uoId":321}'
# update stat configuration
curl --insecure -H "Content-Type:application/json" -H 'X-Auth-Token: a' 'https://localhost:8444/api/v1/client/config/TEST/development' -d '{"splunkConfig": {"endpoint":"https://127.0.0.1:8088", "token": "4FBE1D2F-354D-4947-BA1F-3629CB5F04AF", "caRoots": "", "verifyTls":false}}'