Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add puppet tasks to call collectdctl #882

Merged
merged 2 commits into from
Jun 14, 2019
Merged

Conversation

traylenator
Copy link
Contributor

Pull Request (PR) description

Two puppet tasks

  • collectd::listval - lists all collectd metrics on a node
  • collectd::getval metric=load/load-relative - shows values
    of a particular metric

For example

$ bolt -u root task run collectd::getval metric=load/load-relative -n node.example.org
Started on node.example.org...
Finished on node.example.org:
  {
    "metric": "load/load-relative",
    "values": {
      "shortterm": "1.750000e-01",
      "longterm": "8.000000e-02",
      "midterm": "8.500000e-02"
    }
  }

@traylenator
Copy link
Contributor Author

I added a new dependency to metadata.yaml - I'm easily persuaded this should just be a comment in the README.

@traylenator traylenator changed the title Add puppet tasts to call collectdctl Add puppet tasks to call collectdctl Jun 12, 2019
Two puppet tasks

* collectd::listval - lists all collectd metrics on a node
* collectd::getval metric=load/load-relative - shows values
  of a particular metric

For example

```bash
$ bolt -u root task run mine::getval metric=load/load-relative -n node.example.org
Started on node.example.org...
Finished on node.example.org:
  {
    "metric": "load/load-relative",
    "values": {
      "shortterm": "1.750000e-01",
      "longterm": "8.000000e-02",
      "midterm": "8.500000e-02"
    }
  }
```
@traylenator
Copy link
Contributor Author

There is a massive lack of tests here. Very happy to do some but we need some framework.

@alexjfisher alexjfisher added the enhancement New feature or request label Jun 13, 2019
Copy link
Member

@alexjfisher alexjfisher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alexjfisher
Copy link
Member

I added a new dependency to metadata.yaml - I'm easily persuaded this should just be a comment in the README.

I think it's fine in the metadata.

@traylenator
Copy link
Contributor Author

It's broken on centos6 with python 2.6 . I have a fix migrating to python3 which is available on 6 also.
Another commit here?

Mostly to avoid python 2.6 on CentOS 6 use python3
explictly.
@traylenator traylenator merged commit 46a4cb8 into voxpupuli:master Jun 14, 2019
@traylenator traylenator deleted the tasks branch June 14, 2019 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants