generated from bcgov/vue-scaffold
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #443 from bcgov/adding-splunk
adding in splunk integration dev, test, prod
- Loading branch information
Showing
5 changed files
with
99 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
envValue=$1 | ||
APP_NAME=$2 | ||
OPENSHIFT_NAMESPACE=$3 | ||
SPLUNK_TOKEN=$4 | ||
|
||
SPLUNK_URL="gww.splunk.educ.gov.bc.ca" | ||
FLB_CONFIG="[SERVICE] | ||
Flush 1 | ||
Daemon Off | ||
Log_Level debug | ||
HTTP_Server On | ||
HTTP_Listen 0.0.0.0 | ||
Parsers_File parsers.conf | ||
[INPUT] | ||
Name tail | ||
Path /mnt/log/* | ||
Parser docker | ||
Mem_Buf_Limit 20MB | ||
[FILTER] | ||
Name record_modifier | ||
Match * | ||
Record hostname \${HOSTNAME} | ||
[OUTPUT] | ||
Name stdout | ||
Match * | ||
[OUTPUT] | ||
Name splunk | ||
Match * | ||
Host $SPLUNK_URL | ||
Port 443 | ||
TLS On | ||
TLS.Verify Off | ||
Message_Key $APP_NAME | ||
Splunk_Token $SPLUNK_TOKEN | ||
" | ||
PARSER_CONFIG=" | ||
[PARSER] | ||
Name docker | ||
Format json | ||
" | ||
|
||
echo Creating config map $APP_NAME-flb-sc-config-map | ||
oc create -n $OPENSHIFT_NAMESPACE-$envValue configmap $APP_NAME-flb-sc-config-map \ | ||
--from-literal=fluent-bit.conf="$FLB_CONFIG" \ | ||
--from-literal=parsers.conf="$PARSER_CONFIG" \ | ||
--dry-run -o yaml | oc apply -f - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters