Skip to content

Commit e72b039

Browse files
feat: Update readme for release (#11)
* update script file to output help in markdown * update readme * updates
1 parent 4b278a4 commit e72b039

File tree

2 files changed

+50
-50
lines changed

2 files changed

+50
-50
lines changed

README.md

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
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

2421
1. 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+
***************************

observe_configure_script.sh

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -149,28 +149,27 @@ curlObserve(){
149149

150150
printHelp(){
151151
echo "$SPACER"
152-
echo "HELP CONTENT"
153-
echo "$SPACER"
154-
echo "Required inputs"
155-
echo "Required --customer_id YOUR_CUSTOMERID "
156-
echo "Required --ingest_token YOUR_DATA_STREAM_TOKEN "
157-
echo "Optional inputs"
158-
echo "Optional --observe_host_name PROD or STAGE - Defaults to PROD "
159-
echo "Optional --config_files_clean TRUE or FALSE - Defaults to FALSE "
152+
echo "## HELP CONTENT"
153+
echo "$SPACER"
154+
echo "### Required inputs"
155+
echo "- Required --customer_id YOUR_OBSERVE_CUSTOMERID "
156+
echo "- Required --ingest_token YOUR_OBSERVE_DATA_STREAM_TOKEN "
157+
echo "## Optional inputs"
158+
echo "- Optional --observe_host_name - Defaults to https://collect.observe.com/ "
159+
echo "- Optional --config_files_clean TRUE or FALSE - Defaults to FALSE "
160160
echo " controls whether to delete created config_files temp directory"
161-
echo "Optional --ec2metadata TRUE or FALSE - Defaults to FALSE "
161+
echo "- Optional --ec2metadata TRUE or FALSE - Defaults to FALSE "
162162
echo " controls fluentbit config for whether to use default ec2 metrics "
163-
echo "Optional --datacenter defaults to AWS"
164-
echo "Optional --appgroup id supplied sets value in fluentbit config"
165-
echo "Optional --branch_input branch of repository to pull scrips and config files from -Defaults to main"
166-
echo "Optional --validate_endpoint of observe_hostname using customer_id and ingest_token -Defaults to TRUE"
167-
echo "Optional --module to use for installs -Defaults to linux_host which installs osquery, fluentbit and telegraf"
163+
echo "- Optional --datacenter defaults to AWS"
164+
echo "- Optional --appgroup id supplied sets value in fluentbit config"
165+
echo "- Optional --branch_input branch of repository to pull scrips and config files from -Defaults to main"
166+
echo "- Optional --validate_endpoint of observe_hostname using customer_id and ingest_token -Defaults to TRUE"
167+
echo "- Optional --module to use for installs -Defaults to linux_host which installs osquery, fluentbit and telegraf"
168168
echo " can be combined with jenkins flag which add a config to fluentbit or only jenkons flag which only installs fluent bit with configs"
169-
echo "Optional --observe_jenkins_path used in combination with jenkins module - location of jenkins logs"
169+
echo "- Optional --observe_jenkins_path used in combination with jenkins module - location of jenkins logs"
170170
echo "***************************"
171-
echo " Sample command:"
172-
echo "./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"
173-
echo "--config_files_clean TRUE --ec2metadata TRUE --datacenter myCompanyDataCenter --appgroup myAppGroup"
171+
echo "### Sample command:"
172+
echo "\`\`\` 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 https://collect.observe-staging.com/ --config_files_clean TRUE --datacenter MYDATACENTER --appgroup MYAPPGROUP --config_files_clean TRUE --ec2metadata TRUE --datacenter myCompanyDataCenter --appgroup myAppGroup\`\`\`"
174173
echo "***************************"
175174
}
176175

0 commit comments

Comments
 (0)