Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/springerpe/mtail-boshrelease
https://github.com/google/mtail in bosh
https://github.com/springerpe/mtail-boshrelease
bosh bosh-addon bosh-release cloud-foundry
Last synced: 6 days ago
JSON representation
https://github.com/google/mtail in bosh
- Host: GitHub
- URL: https://github.com/springerpe/mtail-boshrelease
- Owner: SpringerPE
- License: mit
- Created: 2020-01-28T12:58:56.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-03T15:47:55.000Z (almost 2 years ago)
- Last Synced: 2024-11-14T11:41:45.426Z (2 months ago)
- Topics: bosh, bosh-addon, bosh-release, cloud-foundry
- Language: Shell
- Size: 49.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mtail-boshrelease
PoC of mtail: https://github.com/google/mtail/
# Creating and using a release:
In order to test and create a "non final" (dev) release, run:
```
# Update or sync blobs
./update-blobs.sh
# Create a dev release
bosh create-release --force --tarball=/tmp/release.tgz
# Upload release to bosh director
bosh -e upload-release /tmp/release.tgz
```For a final release, make sure you have GITHUB_TOKEN defined and `s3cmd`
command with the proper credentials (also populate `config/private.yml`
with the S3 key id and key.You can deploy an empty vm with this example manifest to provide
a metric per log file with the number of lines (graphite is also
enabled here!):```
name: mtailreleases:
- name: mtail
version: latestinstance_groups:
- name: mtail
instances: 1
vm_type: small
stemcell: default
vm_extensions: []
azs:
- z1
- z2
- z3
networks:
- name: default
jobs:
- name: mtail
release: mtail
properties:
mtail:
port: 3903
graphite: "localhost:5555"
progs:
- name: mtaillogs
log: "/var/vcap/sys/log/mtail/*.log"
config: |
counter filename_lines by filename
/$/ {
filename_lines[getfilename()]++
}stemcells:
- alias: default
name: bosh-google-kvm-ubuntu-xenial-go_agent
version: latestupdate:
canaries: 1
max_in_flight: 1
serial: false
canary_watch_time: 1000-60000
update_watch_time: 1000-60000
```A more realistic purpose is to use this release to provide metrics from the gorouter
access logs by using a runtime-config:```
releases:
- name: mtail
version: "0+dev.4"addons:
- name: mtail
jobs:
- name: mtail
release: mtail
properties:
mtail:
progs:
- name: gorouter
log: "/var/vcap/sys/log/gorouter/access.log"
config: |
counter gorouter_http_requests_total
counter gorouter_http_requests by route, request_method, status_code
counter gorouter_http_requests_app by route, app_id
/^/ +
/(?P[0-9A-Za-z\.:-]+) / +
/- / +
/\[(?P\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}(\+|-)\d{4})\] / +
/"(?P[A-Z]+) (?P\S+) (?PHTTP\/[0-9\.]+)" / +
/(?P\d{3}) / +
/((?P\d+)|-) / +
/(?P\d+) / +
/"(?P\S+)" / +
/"(?P[[:print:]]+)" / +
/"(?P[[:print:]]+)" / +
/"(?P[[:print:]]+)" / +
/x_forwarded_for:"(?P[[:print:]]+)" / +
/x_forwarded_proto:"(?P[[:print:]]+)" / +
/vcap_request_id:"(?P[[:print:]]+)" / +
/response_time:(?P[0-9\.]+) / +
/app_id:"(?P[[:print:]]+)" / +
/app_index:"(?P\d+)" / +
/tls_client_protocol:"(?P[[:print:]]+)" / +
/tls_client_cipher:"(?P[[:print:]]+)" / +
/.*$/ {
# extra fields todo: zipkin headers
gorouter_http_requests_total++
gorouter_http_requests[$route][$request_method][$status_code]++
gorouter_http_requests_app[$route][$app_id]++
}include:
deployments:
- cf
jobs:
- name: gorouter
release: cf
```# Author
(c) Jose Riguera Lopez [email protected]
Springernature Engineering Enablement
MIT License