11# Configuraton script for Linux
2+ ## Assumptions:
3+ - Assumes user running script can use passwordless sudo
24
35## What does it do
4- Inputs:
5- Assumes existence of environment variables
6- --customer_id $OBSERVE_CUSTOMER_ID
7- --ingest_token $OBSERVE_DATASTREAM_TOKEN
8-
96- Creates a config_files directory in home of logged in user
107
118- Downloads configuration files from this git repository
@@ -23,30 +20,34 @@ Assumes existence of environment variables
2320
24211 . Login to machine via ssh
2522
26- 1 . Script flags
27- * --customer_id = your observe customer id - REQUIRED
28- * --ingest_token = your data stream ingest token from ui - REQUIRED
29- * --observe_host_name = host endpoint used in config files - OPTIONAL - defaults to collect.observeinc.com
30- * --config_files_clean = TRUE/FALSE whether to delete directory created for downloading config files - OPTIONAL - defaults to FALSE
31- * --ec2metadata = TRUE/FALSE whether to add ec2 filter section to td-agent-bit.conf file - OPTIONAL - defaults to FALSE
32- ```
33- [FILTER]
34- Name aws
35- Match *
36- imds_version v1
37- az true
38- ec2_instance_id true
39- ec2_instance_type true
40- account_id true
41- hostname true
42- vpc_id true
43- ```
44- * --datacenter = value to use for datacenter in td-agent-bit.conf and telegraf.conf files - OPTIONAL - defaults to AWS
45- * --appgroup = value to use for appgroup record in td-agent-bit.conf file - OPTIONAL - defaults to null
46-
47-
48-
49-
50- 1. Run following script
51- ```
52- curl "https://raw.githubusercontent.com/observeinc/linux-host-configuration-scripts/main/observe_configure_script.sh " | bash -s -- --customer_id "YOUR_CUSTOMERID" --ingest_token "YOUR_DATA_STREAM_TOKEN" --observe_host_name "collect.observeinc.com" --config_files_clean TRUE --ec2metadata TRUE --datacenter "MYDATACENTER" --appgroup "MYAPPGROUP"
23+ 1 . Run script with flag values set
24+
25+
26+
27+ Run --help command for list of flags and options
28+
29+ ``` curl "https://raw.githubusercontent.com/observeinc/linux-host-configuration-scripts/main/observe_configure_script.sh" | bash -s -- --help ```
30+
31+ ###########################################
32+ ## HELP CONTENT
33+ ###########################################
34+ ### Required inputs
35+ - Required --customer_id YOUR_OBSERVE_CUSTOMERID
36+ - Required --ingest_token YOUR_OBSERVE_DATA_STREAM_TOKEN
37+ ## Optional inputs
38+ - Optional --observe_host_name - Defaults to https://collect.observe.com/
39+ - Optional --config_files_clean TRUE or FALSE - Defaults to FALSE
40+ controls whether to delete created config_files temp directory
41+ - Optional --ec2metadata TRUE or FALSE - Defaults to FALSE
42+ controls fluentbit config for whether to use default ec2 metrics
43+ - Optional --datacenter defaults to AWS
44+ - Optional --appgroup id supplied sets value in fluentbit config
45+ - Optional --branch_input branch of repository to pull scrips and config files from -Defaults to main
46+ - Optional --validate_endpoint of observe_hostname using customer_id and ingest_token -Defaults to TRUE
47+ - Optional --module to use for installs -Defaults to linux_host which installs osquery, fluentbit and telegraf
48+ can be combined with jenkins flag which add a config to fluentbit or only jenkons flag which only installs fluent bit with configs
49+ - Optional --observe_jenkins_path used in combination with jenkins module - location of jenkins logs
50+ ***************************
51+ ### Sample command:
52+ ``` ./observe_configure_script.sh --customer_id YOUR_CUSTOMERID --ingest_token YOUR_DATA_STREAM_TOKEN --observe_host_name https://collect.observe-staging.com/ --config_files_clean TRUE --ec2metadata TRUE --datacenter MYDATACENTER --appgroup MYAPPGROUP --config_files_clean TRUE --ec2metadata TRUE --datacenter myCompanyDataCenter --appgroup myAppGroup ```
53+ ***************************
0 commit comments