v0.7.1 changes

This commit is contained in:
Dave Horton
2021-12-25 14:17:40 -05:00
parent 81b75f3353
commit 379431c339
13 changed files with 5048 additions and 15 deletions
+1 -3
View File
@@ -61,9 +61,7 @@ Parameters:
Mappings:
AWSRegion2AMI:
us-east-1:
Ami: ami-02c495bd21f6dc649
us-east-2:
Ami: ami-09d1174f2643430bc
Ami: ami-035bcc6fac991af1b
Resources:
VPC:
Type: 'AWS::EC2::VPC'
@@ -19,7 +19,12 @@ data:
JAMBONES_NETWORK_CIDR: "10.128.0.0/9,10.72.0.0/14"
JAMBONES_CLUSTER_ID: jbeast2
JAMBONES_LOGLEVEL: debug
ENABLE_METRICS: "0"
ENABLE_METRICS: "1"
STATS_HOST: telegraf.jambonz-monitoring.svc.cluster.local
STATS_PORT: "8125"
STATS_PROTOCOL: tcp
STATS_TELEGRAF: "1"
STATS_SAMPLE_RATE: "1"
JAMBONES_MYSQL_DATABASE: jambones
JAMBONES_MYSQL_HOST: mysql
JAMBONES_MYSQL_PASSWORD: jambones
File diff suppressed because it is too large Load Diff
@@ -20,8 +20,6 @@ spec:
securityContext:
runAsUser: 472
fsGroup: 472
nodeSelector:
kubernetes.io/arch: amd64
containers:
- image: grafana/grafana-oss:latest
name: grafana
@@ -49,7 +47,32 @@ spec:
volumeMounts:
- mountPath: /var/lib/grafana
name: grafana-claim
- mountPath: /etc/grafana/provisioning/datasources/datasource.yaml
name: grafana-provisioning
subPath: datasource.yaml
- mountPath: /etc/grafana/provisioning/dashboards/default.yaml
name: grafana-provisioning
subPath: default-dashboard.yaml
- mountPath: /var/lib/grafana/dashboards/jambonz-dashboard.json
name: grafana-provisioning
subPath: jambonz-dashboard.json
- mountPath: /var/lib/grafana/dashboards/jambonz-heplify.json
name: grafana-provisioning
subPath: jambonz-heplify.json
restartPolicy: Always
volumes:
- name: grafana-provisioning
configMap:
name: grafana-provisioning
items:
- key: datasource.yaml
path: datasource.yaml
- key: default-dashboard.yaml
path: default-dashboard.yaml
- key: jambonz-dashboard.json
path: jambonz-dashboard.json
- key: jambonz-heplify.json
path: jambonz-heplify.json
volumeClaimTemplates:
- metadata:
name: grafana-claim
@@ -17,8 +17,6 @@ spec:
labels:
app: influxdb
spec:
nodeSelector:
kubernetes.io/arch: amd64
containers:
- image: influxdb:1.8
name: influxdb
@@ -6,8 +6,11 @@ namespace: jambonz-monitoring
resources:
- influxdb/influxdb-statefulset.yaml
- influxdb/influxdb-service.yaml
- grafana/grafana-configmap.yaml
- grafana/grafana-statefulset.yaml
- grafana/grafana-service.yaml
- grafana/grafana-ingress.yaml
- telegraf/telegraf-statefulset.yaml
- telegraf/telegraf-service.yaml
- telegraf/telegraf-configmap.yaml
- namespace.yaml
@@ -0,0 +1,277 @@
apiVersion: v1
kind: ConfigMap
metadata:
namespace: jambonz-monitoring
name: telegraf-conf
data:
telegraf.conf: |
# Global tags can be specified here in key="value" format.
[global_tags]
# dc = "us-east-1" # will tag all metrics with dc=us-east-1
# rack = "1a"
## Environment variables can be used as tags, and throughout the config file
# user = "$USER"
# Configuration for telegraf agent
[agent]
## Default data collection interval for all inputs
interval = "10s"
## Rounds collection interval to 'interval'
## ie, if interval="10s" then always collect on :00, :10, :20, etc.
round_interval = true
## Telegraf will send metrics to outputs in batches of at most
## metric_batch_size metrics.
## This controls the size of writes that Telegraf sends to output plugins.
metric_batch_size = 1000
## Maximum number of unwritten metrics per output. Increasing this value
## allows for longer periods of output downtime without dropping metrics at the
## cost of higher maximum memory usage.
metric_buffer_limit = 10000
## Collection jitter is used to jitter the collection by a random amount.
## Each plugin will sleep for a random time within jitter before collecting.
## This can be used to avoid many plugins querying things like sysfs at the
## same time, which can have a measurable effect on the system.
collection_jitter = "0s"
## Default flushing interval for all outputs. Maximum flush_interval will be
## flush_interval + flush_jitter
flush_interval = "10s"
## Jitter the flush interval by a random amount. This is primarily to avoid
## large write spikes for users running a large number of telegraf instances.
## ie, a jitter of 5s and interval 10s means flushes will happen every 10-15s
flush_jitter = "0s"
## By default or when set to "0s", precision will be set to the same
## timestamp order as the collection interval, with the maximum being 1s.
## ie, when interval = "10s", precision will be "1s"
## when interval = "250ms", precision will be "1ms"
## Precision will NOT be used for service inputs. It is up to each individual
## service input to set the timestamp at the appropriate precision.
## Valid time units are "ns", "us" (or "µs"), "ms", "s".
precision = ""
## Log at debug level.
# debug = false
## Log only error level messages.
# quiet = false
## Log target controls the destination for logs and can be one of "file",
## "stderr" or, on Windows, "eventlog". When set to "file", the output file
## is determined by the "logfile" setting.
# logtarget = "file"
## Name of the file to be logged to when using the "file" logtarget. If set to
## the empty string then logs are written to stderr.
# logfile = ""
## The logfile will be rotated after the time interval specified. When set
## to 0 no time based rotation is performed. Logs are rotated only when
## written to, if there is no log activity rotation may be delayed.
# logfile_rotation_interval = "0d"
## The logfile will be rotated when it becomes larger than the specified
## size. When set to 0 no size based rotation is performed.
# logfile_rotation_max_size = "0MB"
## Maximum number of rotated archives to keep, any older logs are deleted.
## If set to -1, no archives are removed.
# logfile_rotation_max_archives = 5
## Override default hostname, if empty use os.Hostname()
hostname = ""
## If set to true, do no set the "host" tag in the telegraf agent.
omit_hostname = false
###############################################################################
# OUTPUT PLUGINS #
###############################################################################
# Configuration for sending metrics to InfluxDB
[[outputs.influxdb]]
urls = ["http://influxdb.jambonz-monitoring.svc.cluster.local:8086/"] # required
database = "telegraf" # required
retention_policy = "autogen"
write_consistency = "any"
timeout = "5s"
namedrop = ["hep*"]
[[outputs.influxdb]]
urls = ["http://influxdb.jambonz-monitoring.svc.cluster.local:8086/"] # required
database = "homer" # required
retention_policy = ""
write_consistency = "any"
timeout = "5s"
namepass = ["hep*"]
## The full HTTP or UDP URL for your InfluxDB instance.
##
## Multiple URLs can be specified for a single cluster, only ONE of the
## urls will be written to each interval.
# urls = ["unix:///var/run/influxdb.sock"]
# urls = ["udp://127.0.0.1:8089"]
# urls = ["http://127.0.0.1:8086"]
## The target database for metrics; will be created as needed.
## For UDP url endpoint database needs to be configured on server side.
# database = "telegraf"
## The value of this tag will be used to determine the database. If this
## tag is not set the 'database' option is used as the default.
# database_tag = ""
## If true, the 'database_tag' will not be included in the written metric.
# exclude_database_tag = false
## If true, no CREATE DATABASE queries will be sent. Set to true when using
## Telegraf with a user without permissions to create databases or when the
## database already exists.
# skip_database_creation = false
## Name of existing retention policy to write to. Empty string writes to
## the default retention policy. Only takes effect when using HTTP.
# retention_policy = ""
## The value of this tag will be used to determine the retention policy. If this
## tag is not set the 'retention_policy' option is used as the default.
# retention_policy_tag = ""
## If true, the 'retention_policy_tag' will not be included in the written metric.
# exclude_retention_policy_tag = false
## Write consistency (clusters only), can be: "any", "one", "quorum", "all".
## Only takes effect when using HTTP.
# write_consistency = "any"
## Timeout for HTTP messages.
# timeout = "5s"
## HTTP Basic Auth
# username = "telegraf"
# password = "metricsmetricsmetricsmetrics"
## HTTP User-Agent
# user_agent = "telegraf"
## UDP payload size is the maximum packet size to send.
# udp_payload = "512B"
## Optional TLS Config for use on HTTP connections.
# tls_ca = "/etc/telegraf/ca.pem"
# tls_cert = "/etc/telegraf/cert.pem"
# tls_key = "/etc/telegraf/key.pem"
## Use TLS but skip chain & host verification
# insecure_skip_verify = false
## HTTP Proxy override, if unset values the standard proxy environment
## variables are consulted to determine which proxy, if any, should be used.
# http_proxy = "http://corporate.proxy:3128"
## Additional HTTP headers
# http_headers = {"X-Special-Header" = "Special-Value"}
## HTTP Content-Encoding for write request body, can be set to "gzip" to
## compress body or "identity" to apply no encoding.
# content_encoding = "gzip"
## When true, Telegraf will output unsigned integers as unsigned values,
## i.e.: "42u". You will need a version of InfluxDB supporting unsigned
## integer values. Enabling this option will result in field type errors if
## existing data has been written.
# influx_uint_support = false
###############################################################################
# INPUT PLUGINS #
###############################################################################
# Read metrics about cpu usage
[[inputs.cpu]]
## Whether to report per-cpu stats or not
percpu = true
## Whether to report total system cpu stats or not
totalcpu = true
## If true, collect raw CPU time metrics.
collect_cpu_time = false
## If true, compute and report the sum of all non-idle CPU states.
report_active = false
# Read metrics about disk usage by mount point
[[inputs.disk]]
## By default stats will be gathered for all mount points.
## Set mount_points will restrict the stats to only the specified mount points.
# mount_points = ["/"]
## Ignore mount points by filesystem type.
ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"]
# Get kernel statistics from /proc/stat
[[inputs.kernel]]
# no configuration
# Read metrics about memory usage
[[inputs.mem]]
# no configuration
# Get the number of processes and group them by status
[[inputs.processes]]
# no configuration
# Read metrics about swap memory usage
[[inputs.swap]]
# no configuration
# Read metrics about system load & uptime
[[inputs.system]]
## Uncomment to remove deprecated metrics.
# fielddrop = ["uptime_format"]
# # Monitor process cpu and memory usage
[[inputs.procstat]]
exe = "freeswitch"
[[inputs.procstat]]
exe = "rtpengine"
[[inputs.procstat]]
exe = "drachtio"
[[inputs.procstat]]
exe = "node"
[[inputs.socket_listener]]
service_address = "udp://127.0.0.1:8094"
data_format = "influx"
[[inputs.socket_listener]]
service_address = "tcp://127.0.0.1:8094"
data_format = "influx"
# # Statsd UDP/TCP Server
[[inputs.statsd]]
protocol = "tcp"
max_tcp_connections = 250
tcp_keep_alive = false
# tcp_keep_alive_period = "2h"
service_address = ":8125"
delete_gauges = true
delete_counters = true
delete_sets = true
delete_timings = true
## Percentiles to calculate for timing & histogram stats.
percentiles = [50.0, 75.0, 95.0, 99.0, 99.95, 100.0]
metric_separator = "_"
datadog_extensions = true
allowed_pending_messages = 10000
percentile_limit = 1000
# read_buffer_size = 65535
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: telegraf
name: telegraf
namespace: jambonz-monitoring
spec:
ports:
- name: telegraf
port: 8125
targetPort: 8125
selector:
app: telegraf
clusterIP: None
@@ -17,11 +17,21 @@ spec:
labels:
app: telegraf
spec:
nodeSelector:
kubernetes.io/arch: amd64
containers:
- image: telegraf:1.19
name: telegraf
ports:
- containerPort: 8125
restartPolicy: Always
resources: {}
volumeMounts:
- mountPath: /etc/telegraf/telegraf.conf
name: telegraf-conf
subPath: telegraf.conf
restartPolicy: Always
volumes:
- name: telegraf-conf
configMap:
name: telegraf-conf
items:
- key: telegraf.conf
path: telegraf.conf
@@ -16,8 +16,7 @@ module.exports = {
GOOGLE_APPLICATION_CREDENTIALS: '/home/admin/credentials/$${GOOGLE_APPLICATION_CREDENTIALS}',
AWS_ACCESS_KEY_ID: '${AWS_ACCESS_KEY_ID}',
AWS_SECRET_ACCESS_KEY: '${AWS_SECRET_ACCESS_KEY}',
AWS_REGION: '$${AWS_REGION}',
ENABLE_DATADOG_METRICS: 0,
AWS_REGION: '${AWS_REGION}',
ENABLE_DATADOG_METRICS: 0,
JAMBONES_NETWORK_CIDR: '172.31.32.0/24',
JAMBONES_MYSQL_HOST: '${JAMBONES_MYSQL_HOST}',
@@ -271,6 +271,7 @@ module.exports = {
STATS_PORT: 8125,
STATS_PROTOCOL: 'tcp',
STATS_TELEGRAF: 1,
AWS_REGION: 'AWS_REGION_NAME',
JAMBONES_NETWORK_CIDR: 'PRIVATE_IP/32',
JAMBONES_MYSQL_HOST: '127.0.0.1',
JAMBONES_MYSQL_USER: 'admin',
@@ -22,7 +22,7 @@ tar xvfz SpeechSDK-Linux-1.19.0.tar.gz
cd SpeechSDK-Linux-1.19.0
sudo cp -r include /usr/local/include/MicrosoftSpeechSDK
sudo cp -r lib/ /usr/local/lib/MicrosoftSpeechSDK
sudo ln -s /usr/local/lib/MicrosoftSpeechSDK/lib/x64/libMicrosoft.CognitiveServices.Speech.core.so /usr/local/lib/libMicrosoft.CognitiveServices.Speech.core.so
sudo ln -s /usr/local/lib/MicrosoftSpeechSDK/x64/libMicrosoft.CognitiveServices.Speech.core.so /usr/local/lib/libMicrosoft.CognitiveServices.Speech.core.so
cd
rm -Rf /tmpSpeechSDK-Linux-1.19.0
rm -Rf /tmpSpeechSDK-Linux-1.19.0.tar.gz
+1 -1
View File
@@ -5,7 +5,7 @@
"ami_description": "jambonz all-in-one AMI",
"instance_type": "t2.xlarge",
"drachtio_version": "v0.8.13-rc1",
"jambonz_version": "v0.7.0",
"jambonz_version": "v0.7.1",
"jambonz_user": "admin",
"jambonz_password": "JambonzR0ck$",
"install_telegraf": "yes",