Installing collectd Add-on for PCF

This topic describes how to add collectd to your Pivotal Cloud Foundry (PCF) deployment.

About collectd Add-on for PCF

This add-on is required to enable the Altoros Heartbeat monitoring solution consume system metrics from the VMs that make up a PCF deployment. The collectd add-on gathers VM metrics from PCF platform components and any other BOSH-deployed services (e.g., databases) and makes this information available to Altoros Heartbeat over the network.


Note: collectd add-on for PCF does not work on Windows machines.

To complete the collectd add-on installation:

  • You must be a PCF operator with admin rights. For more information, see Understanding Pivotal Cloud Foundry User Types.
  • You must have a Pivotal Operations Manager (Ops Manager) v1.10 or later.
  • collectd add-on uses 50 MB of memory. Ensure you have at least 128 MB of memory free on each VM before deploying collectd add-on.

Creating a collectd Manifest

A collectd manifest is a YML file that contains runtime configuration information for the collectd add-on. Follow the steps below to create a collectd manifest for your deployment:

  1. Create a file named collectd.yml, starting with the code below as a template:

    - name: collectd
      version: 10
    - name: collectd
      - name: collectd
        release: collectd
        deployments: ['some-deployment-name-to-exclude']
          graphite_prefix: cf.collectd.
          interval: 10
  2. Replace the values listed in the template as follows:

  • exclude: deployments: (Optional) Specify the name of the deployment to mass exclude from the collectd add-on coverage.

    Note If this functionality is not required, remove this section.

  • releases: version: Please use the version of collectd downloaded from Pivotal Network

  • collectd: graphite_prefix: Do not change the graphit_prefix name. It must be cf.collectd.

  • collectd: graphite_servers: If you are using Heartbeat in high availability mode, use your Load Balancer endpoint for collectd. For details, see External Load Balancer configuration. If you are not going to use the high availability mode, use the IP address of any of Altoros Heartbeat’s backends. For details, see Finding Backend IPs.

  • collectd: interval: You can modify the 10 second default interval value. This value specifies how often the collectd add-on gathers metrics from VMs.

Downloading and Deploying the collectd Add-on

  1. Download the collectd add-on software binary from the Pivotal Network to your local machine.

  2. Copy the software binary to your Ops Manager VM.

    $ scp -i PATH/TO/PRIVATE/KEY collectd-10.tgz ubuntu@YOUR-OPS-MANAGER-VM-IP:
  3. Copy the collectd manifest, collectd.yml file, to your Ops Manager instance.

    $ scp -i PATH/TO/PRIVATE/KEY collectd.yml ubuntu@YOUR-OPS-MANAGER-VM-IP:
  4. SSH into Ops Manager.

  5. On the Ops Manager VM, navigate to the software binary location.

    $ cd ~
  6. On the Ops Manager VM, target your BOSH director instance.

    Target set to 'Ops Manager'
    Your username: director
    Enter password: ****
    Logged in as 'director'
  7. Upload your release.

    $ bosh upload release ~/BINARY-NAME.tgz
  8. From the command line, confirm that the upload of the collectd software binary completed. You should see the collectd release.

    $ bosh releases
  9. Update your runtime configuration to include the collectd add-on.

    Note: If you installed other BOSH add-ons, you must merge the collectd manifest into your existing add-on manifest. Append the contents of collectd.yml to your existing add-on YML file.

    $ bosh update runtime-config PATH/YOUR-ADD-ON-YML.yml
  10. Verify your runtime configuration changes match what you specified in the collectd manifest.

    $ bosh runtime-config
    Acting as user 'admin' on 'micro'
    - name: collectd
      version: 10
    - name: collectd
      - name: collectd
        release: collectd
  11. Navigate to your Installation Dashboard in Ops Manager.

  12. Click Apply Changes.

Verifying the Installation

  1. BOSH SSH into one of the VMs in your deployment.

  2. Run monit summary. Look for the following processes in the output:

    The Monit daemon 5.2.4 uptime: 3d 0h 01m
    Process 'collectd' running
  3. If monit summary does not list collectd, perform the following steps:

    1. Try to start the collectd processes by running the following command:
      $ monit start collectd
    2. Run the monit summary again. If you do not see the processes mentioned above, check /var/vcap/sys/log/collectd logs for errors.

Uninstalling the collectd Add-on

Follow the steps below to remove the collectd add-on from your existing runtime config and roll back to a previous configuration:

  1. SSH into Ops Manager.

  2. On the Ops Manager VM, retrieve the latest runtime configuration saved on the BOSH Director.

    $ bosh runtime-config > PATH-TO-SAVE-THE-RUNTIME-CONFIG
  3. Remove the lines added at step 1 of Creating a collectd Manifest.

  4. Update the runtime configuration.

    $ bosh update runtime-config PATH-TO-SAVE-THE-RUNTIME-CONFIG
  5. Navigate to your Installation Dashboard in Ops Manager.

  6. Click Apply Changes.

If you have no existing runtime configuration, follow the steps below:

  1. On the Ops Manager VM, create an empty-runtime.yml manifest file.

    $ cat empty-runtime.yml
    releases: []
  2. Update the runtime configuration with empty-runtime.yml.

    $ bosh update runtime-config empty-runtime.yml
  3. Navigate to your Installation Dashboard in Ops Manager.

  4. Click Apply Changes.

The collectd add-on will be removed from your deployment.

Create a pull request or raise an issue on the source for this page in GitHub