Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion build/linux/installer/conf/telegraf-prom-side-car.conf
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
data_format = "json"
namedrop = ["agent_telemetry"]
namedrop = ["agent_telemetry", "file"]

###############################################################################
# PROCESSOR PLUGINS #
Expand All @@ -119,6 +119,12 @@
[processors.converter.fields]
float = ["*"]

# Dummy plugin to test out toml parsing happens properly
[[inputs.file]]
interval = "24h"
files = ["test.json"]
data_format = "json"

#Prometheus Custom Metrics
[[inputs.prometheus]]
interval = "$AZMON_TELEGRAF_CUSTOM_PROM_INTERVAL"
Expand Down
8 changes: 7 additions & 1 deletion build/linux/installer/conf/telegraf-rs.conf
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
data_format = "json"
namedrop = ["agent_telemetry"]
namedrop = ["agent_telemetry", "file"]
#tagdrop = ["AgentVersion","AKS_RESOURCE_ID", "ACS_RESOURCE_NAME", "Region","ClusterName","ClusterType", "Computer", "ControllerType"]

[[outputs.application_insights]]
Expand Down Expand Up @@ -538,6 +538,12 @@
#tagexclude = ["AgentVersion","AKS_RESOURCE_ID","ACS_RESOURCE_NAME", "Region", "ClusterName", "ClusterType", "Computer", "ControllerType"]
# [inputs.prometheus.tagpass]

# Dummy plugin to test out toml parsing happens properly
[[inputs.file]]
interval = "24h"
files = ["test.json"]
data_format = "json"

#Prometheus Custom Metrics
[[inputs.prometheus]]
interval = "$AZMON_TELEGRAF_CUSTOM_PROM_INTERVAL"
Expand Down
8 changes: 6 additions & 2 deletions build/linux/installer/conf/telegraf.conf
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
data_format = "json"
namedrop = ["agent_telemetry"]
namedrop = ["agent_telemetry", "file"]
#tagdrop = ["AgentVersion","AKS_RESOURCE_ID", "ACS_RESOURCE_NAME", "Region","ClusterName","ClusterType", "Computer", "ControllerType"]

# Output to send MDM metrics to fluent bit and then route it to fluentD
Expand Down Expand Up @@ -425,7 +425,11 @@
# fieldpass = ["usage_active","cluster","node","host","device"]
# taginclude = ["cluster","cpu","node"]


# Dummy plugin to test out toml parsing happens properly
[[inputs.file]]
interval = "24h"
files = ["test.json"]
data_format = "json"

# Read metrics about disk usage by mount point
[[inputs.disk]]
Expand Down
1 change: 1 addition & 0 deletions build/linux/installer/conf/test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
3 changes: 3 additions & 0 deletions build/linux/installer/datafiles/base_container.data
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ MAINTAINER: 'Microsoft Corporation'
/etc/opt/microsoft/docker-cimprov/td-agent-bit-rs.conf; build/linux/installer/conf/td-agent-bit-rs.conf; 644; root; root
/etc/opt/microsoft/docker-cimprov/azm-containers-parser.conf; build/linux/installer/conf/azm-containers-parser.conf; 644; root; root
/etc/opt/microsoft/docker-cimprov/out_oms.conf; build/linux/installer/conf/out_oms.conf; 644; root; root
/etc/opt/microsoft/docker-cimprov/test.json; build/linux/installer/conf/test.json; 644; root; root
/etc/opt/microsoft/docker-cimprov/telegraf.conf; build/linux/installer/conf/telegraf.conf; 644; root; root
/etc/opt/microsoft/docker-cimprov/telegraf-prom-side-car.conf; build/linux/installer/conf/telegraf-prom-side-car.conf; 644; root; root
/etc/opt/microsoft/docker-cimprov/telegraf-rs.conf; build/linux/installer/conf/telegraf-rs.conf; 644; root; root
Expand All @@ -53,6 +54,8 @@ MAINTAINER: 'Microsoft Corporation'
/opt/ConfigParseErrorLogger.rb; build/common/installer/scripts/ConfigParseErrorLogger.rb; 755; root; root
/opt/tomlparser-npm-config.rb; build/linux/installer/scripts/tomlparser-npm-config.rb; 755; root; root
/opt/tomlparser-osm-config.rb; build/linux/installer/scripts/tomlparser-osm-config.rb; 755; root; root
/opt/test.json; build/linux/installer/conf/test.json; 644; root; root



/etc/opt/microsoft/docker-cimprov/health/healthmonitorconfig.json; build/linux/installer/conf/healthmonitorconfig.json; 644; root; root
Expand Down
9 changes: 6 additions & 3 deletions kubernetes/linux/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -504,27 +504,30 @@ fi
if [ ! -e "/etc/config/kube.conf" ]; then
if [ "${CONTAINER_TYPE}" == "PrometheusSidecar" ] && [ -e "/opt/telegraf-test-prom-side-car.conf" ]; then
echo "****************Start Telegraf in Test Mode**************************"
/opt/telegraf --config /opt/telegraf-test-prom-side-car.conf -test
/opt/telegraf --config /opt/telegraf-test-prom-side-car.conf --input-filter file -test
if [ $? -eq 0 ]; then
mv "/opt/telegraf-test-prom-side-car.conf" "/etc/opt/microsoft/docker-cimprov/telegraf-prom-side-car.conf"
echo "Moving test conf file to telegraf side-car conf since test run succeeded"
fi
echo "****************End Telegraf Run in Test Mode**************************"
else
if [ -e "/opt/telegraf-test.conf" ]; then
echo "****************Start Telegraf in Test Mode**************************"
/opt/telegraf --config /opt/telegraf-test.conf -test
/opt/telegraf --config /opt/telegraf-test.conf --input-filter file -test
if [ $? -eq 0 ]; then
mv "/opt/telegraf-test.conf" "/etc/opt/microsoft/docker-cimprov/telegraf.conf"
echo "Moving test conf file to telegraf daemonset conf since test run succeeded"
fi
echo "****************End Telegraf Run in Test Mode**************************"
fi
fi
else
if [ -e "/opt/telegraf-test-rs.conf" ]; then
echo "****************Start Telegraf in Test Mode**************************"
/opt/telegraf --config /opt/telegraf-test-rs.conf -test
/opt/telegraf --config /opt/telegraf-test-rs.conf --input-filter file -test
if [ $? -eq 0 ]; then
mv "/opt/telegraf-test-rs.conf" "/etc/opt/microsoft/docker-cimprov/telegraf-rs.conf"
echo "Moving test conf file to telegraf replicaset conf since test run succeeded"
fi
echo "****************End Telegraf Run in Test Mode**************************"
fi
Expand Down