Skip to content

This is the bosh release for deploying promfetcher alongside cloud foundry.

License

Notifications You must be signed in to change notification settings

orange-cloudfoundry/promfetcher-release

Repository files navigation

Promfetcher-release

This is the bosh release for deploying promfetcher alongside cloud foundry.

promfetcher was made for cloud foundry and the idea behind is to give ability to fetch metrics from all app instances in a cloud foundry environment.

User can retrieve is metrics by simply call /v1/apps/[org_name]/[space_name]/[app_name]/metrics which will merge all metrics from instances and add labels:

  • organization_id
  • space_id
  • app_id
  • organization_name
  • space_name
  • app_name
  • index - app instance index
  • instance_id - the same as index
  • instance - real container address

It also a service broker for cloud foundry to be able to set metrics endpoint for a particular which not use /metrics by default.

Example

Metrics from app instance 0:

go_memstats_mspan_sys_bytes{} 65536

Metrics from app instance 1:

go_memstats_mspan_sys_bytes{} 5600

become:

go_memstats_mspan_sys_bytes{organization_id="7d66c7e7-196a-40e5-a259-f5afaf6a56f4",space_id="2ac205af-e18f-49a9-9a8b-48ef2bab2292",app_id="621617db-9dd9-4211-8848-b245f3ea16b2",organization_name="system",space_name="tools",app_name="app",index="0",instance_id="0",instance="172.76.112.90:61038"} 65536
go_memstats_mspan_sys_bytes{organization_id="7d66c7e7-196a-40e5-a259-f5afaf6a56f4",space_id="2ac205af-e18f-49a9-9a8b-48ef2bab2292",app_id="621617db-9dd9-4211-8848-b245f3ea16b2",organization_name="system",space_name="tools",app_name="app",index="1",instance_id="1",instance="172.76.112.91:61010"} 65536

Deploy on cloud foundry

Manifest has been created to be set as an ops file for cloud foundry deployment.

Simply add ops file to your cf-deployment:

Add broker for let user choose its endpoint

Run: bosh -d cf run-errand --instance=promfetch/0 promfetch-broker-registrar