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

Monitor available entropy #3524

Merged
merged 5 commits into from
Jan 5, 2018
Merged

Monitor available entropy #3524

merged 5 commits into from
Jan 5, 2018

Conversation

gerardocorea
Copy link
Contributor

Required for all PRs:

  • Signed CLA.
  • Associated README.md updated.
  • Has appropriate unit tests.

@danielnelson danielnelson added area/system feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin labels Nov 29, 2017
@danielnelson
Copy link
Contributor

closes #2647

fields := make(map[string]interface{})

fields["entropy_available"] = int64(entropyValue)
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's just call it entropy_avail to match what is in proc.

@kyzh
Copy link

kyzh commented Jan 2, 2018

Is there anything that I can do to help this PR to be merged and shipped ?
I could bake a cake, but I'm a long way away from SF to deliver it to your office.

@hanej
Copy link

hanej commented Jan 2, 2018

I have something like this to collect entropy in the mean time.

telegraf.conf

[[inputs.exec]]
commands = ["/etc/telegraf/collectors/collect_*.sh"]
data_format = "influx"
timeout = "10s"

shell script

#!/bin/bash

LOCATION=/etc/ansible/facts.d/location.fact

if [ ! -f $LOCATION ]; then
    exit 1
fi

DC=$($LOCATION | grep datacenter | awk '{print $2}' | sed -r 's/"(.*)".*/\1/')
ENV=$($LOCATION | grep '"environment"' | awk '{print $2}' | sed -r 's/"(.*)".*/\1/')
HOST=$(hostname -s)

if [ -z $DC ] || [ -z $ENV ]; then
    exit 1
fi

if [ ! -f /proc/sys/kernel/random/entropy_avail ]; then
    exit 1
fi

VALUE=$(cat /proc/sys/kernel/random/entropy_avail)

echo "system,dc=${DC},env=${ENV},host=${HOST} entropy=${VALUE}"

@danielnelson danielnelson added this to the 1.6.0 milestone Jan 2, 2018
@danielnelson
Copy link
Contributor

@gerardocorea92 Do you think you could fix the unit test?

@gerardocorea
Copy link
Contributor Author

@danielnelson pushed commit to fix CircleCI testing.

@danielnelson danielnelson merged commit ae848e9 into influxdata:master Jan 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/system feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants