Skip to content

metricscollector job from app-autoscaler/1.2.0

Github source: a550307 or master branch

Properties

autoscaler

cf

api

the Cloud Foundry API endpoint

client_id

the client id to log in cf

grant_type

the grant type to log in cf

secret

the secret to log in cf

skip_ssl_validation

Flag to skip ssl validation to connect to CC and UAA

Default
false

instancemetrics_db

address

IP address on which the instancemetricsdb server will listen

Default
autoscalerpostgres.service.cf.internal
databases

The list of databases used in instancemetricsdb database including name

db_scheme

Database scheme to be used to access instancemetricsdb

port

Port on which the instancemetricsdb server will listen

roles

The list of database roles used in instancemetricsdb database including name/password

sslmode

sslmode to connect to postgres server

Default
disable
tls
ca
Default
""

instancemetrics_db_connection_config

connection_max_lifetime
Default
60s
max_idle_connections
Default
10
max_open_connections
Default
100

metricscollector

ca_cert

PEM-encoded CA certificate

collector
collect_interval

the time interval to collect container metrics from loggregator

Default
30s
collect_method

the method to collect metrics from loggregator

Default
streaming
metric_cache_size_per_app

the size of metric cache size for each app

Default
300
persist_metrics

whether or not to store instance metric data to database

Default
true
refresh_interval

the time interval to refresh app policies from policy database

Default
60s
save_interval

the time interval to save metrics in database

Default
5s
health
port

the listening port of health endpoint

Default
6203
hooks
post_start

Script to run after metricscollector has started

Default
""
post_stop

Script to run after metricscollector has stopped

Default
""
pre_start

Script to run before starting metricscollector

Default
""
Example
|+
  #!/bin/bash
  echo "Going to start metricscollector"
  echo "metricscollector data directory is ${DATA_DIR}"
  echo "metricscollector port is ${PORT}"
  echo "metricscollector directory is ${PACKAGE_DIR}"
pre_stop

Script to run before stopping metricscollector

Default
""
http_client_timeout

Http client imeout for metricscollector to communicate with other autoscaler components

Default
60s
logging
level

the level of logging

Default
info
require_consul

whether to start consul agent

Default
true
server
port

the listening port of server

Default
6103
server_cert

PEM-encoded server certificate

server_key

PEM-encoded server key

policy_db

address

IP address on which the policydb server will listen

Default
autoscalerpostgres.service.cf.internal
databases

The list of databases used in policydb database including name

db_scheme

Database scheme to be used to access policydb

port

Port on which the policydb server will listen

roles

The list of database roles used in policydb database including name/password

sslmode

sslmode to connect to postgres server

Default
disable
tls
ca
Default
""

policy_db_connection_config

connection_max_lifetime
Default
60s
max_idle_connections
Default
10
max_open_connections
Default
100

Templates

Templates are rendered and placed onto corresponding instances during the deployment process. This job's templates will be placed into /var/vcap/jobs/metricscollector/ directory (learn more).

  • bin/hooks/post-start.sh (from hooks/post-start.sh.erb)
  • bin/hooks/post-stop.sh (from hooks/post-stop.sh.erb)
  • bin/hooks/pre-start.sh (from hooks/pre-start.sh.erb)
  • bin/hooks/pre-stop.sh (from hooks/pre-stop.sh.erb)
  • bin/metricscollector_ctl (from metricscollector_ctl)
  • bin/pre-start (from pre-start.erb)
  • config/certs/appinstancemetrics_db/ca.crt (from appinstancemetrics_db_ca.crt.erb)
  • config/certs/metricscollector/ca.crt (from metricscollector_ca.crt.erb)
  • config/certs/metricscollector/server.crt (from metricscollector_server.crt.erb)
  • config/certs/metricscollector/server.key (from metricscollector_server.key.erb)
  • config/certs/policy_db/ca.crt (from policy_db_ca.crt.erb)
  • config/metricscollector.yml (from metricscollector.yml.erb)

Packages

Packages are compiled and placed onto corresponding instances during the deployment process. Packages will be placed into /var/vcap/packages/ directory.