# Options for mdsd
# Check 'mdsd -h' for details.

MDSD_ROLE_PREFIX=/var/run/mdsd/default
MDSD_OPTIONS="-d -A -r ${MDSD_ROLE_PREFIX}"

# If this is changed, also change /etc/logrotate.d/mdsd
MDSD_LOG=/var/log

# This is where rsyslog and eventhub messages are spooled.
MDSD_SPOOL_DIRECTORY=/var/opt/microsoft/linuxmonagent

MDSD_OPTIONS="-A -c /etc/mdsd.d/mdsd.xml -d -r $MDSD_ROLE_PREFIX -S $MDSD_SPOOL_DIRECTORY/eh -e $MDSD_LOG/mdsd.err -w $MDSD_LOG/mdsd.warn -o $MDSD_LOG/mdsd.info"

export MDSD_TCMALLOC_RELEASE_FREQ_SEC=1
#export MDSD_TCMALLOC_PRINT_STATS_FREQ_SEC=10

#SSL_CERT_DIR=
#SSL_CERT_FILE

# REQUIRED: Identity Configuration
# 
# By default, your Geneva configuration file should have the following element:
# <Identity type="TenantRole" />
#
# The above element instructs the agent to use the following MONITORING_* environment variables
# for setting the agent identity. These can be used to organize and identify your agent instances
# and can be set to any value you would like to use. Each instance of the agent should have a 
# unique combination of Tenant/Role/RoleInstance.
#
# For more information on Agent Identity and advanced configuration see:
# https://genevamondocs.azurewebsites.net/collect/advanced/linuxconfig.html#linux-agent-identity
#
#export MONITORING_TENANT=Tenant1
#export MONITORING_ROLE=Role1
#export MONITORING_ROLE_INSTANCE=RoleInstance1

# For instructions on configuring mdsd for GCS, see:
# https://genevamondocs.azurewebsites.net/collect/environments/linuxvm.html
# In order to enable GCS, uncomment and set all 5 GCS environment variables below

# REQUIRED
# Geneva environment. Examples: Test, FirstPartyProd, DiagnosticsProd
# For the full list of environments, see:
# https://genevamondocs.azurewebsites.net/logs/manage/references/endpoints.html
#
#export MONITORING_GCS_ENVIRONMENT=Test

# REQUIRED
# Geneva Account name
#
#export MONITORING_GCS_ACCOUNT=GenevaAccountName

# REQUIRED
# The region GCS should use when it determines which storage account credentials it should return to MA. e.g. "westus", "eastus".
# Generally, it's best to obtain this value on the VM hosting the agent by querying the Azure Instance Metadata Service (IMDS) for the "location" value (see above code snippet).
#
#export MONITORING_GCS_REGION=westus
# or, pulling data from IMDS
#imdsURL="http://169.254.169.254/metadata/instance/compute/location?api-version=2017-04-02\&format=text"
#export MONITORING_GCS_REGION="$(curl -H Metadata:true --silent $imdsURL)"

# REQUIRED
# Full path to public certificate file used to authenticate mdsd with GCS service.
#
#export MONITORING_GCS_CERT_CERTFILE=/etc/mdsd.d/gcscert.pem

# REQUIRED
# Full path to the private key file used to authenticate mdsd with GCS service.
#
#export MONITORING_GCS_CERT_KEYFILE=/etc/mdsd.d/gcskey.pem

# Below are to enable GCS config download. Update for your namespace and config version.
#export MONITORING_GCS_NAMESPACE=GenevaLogsNamespace
#export MONITORING_CONFIG_VERSION=1.0
#export MONITORING_USE_GENEVA_CONFIG_SERVICE=true
