Comments (2)
nevermind i just read the python file and it does work already. Thanks!
from datadog-smartmon.
going to add how I implemented this because you saved me a TON of work. We use saltstack to deploy changes on machines, here's the salt state in case anyone else uses salt and wants to apply this:
{% if grains['os'] == 'Ubuntu' and grains['manufacturer'] == 'Dell Inc.' -%}
#ensure that the smartmontools pacckage is installed
base-drive_health-smartmontools:
pkg.installed:
- name: smartmontools
base-drive_health-change-smartctl-perms:
cmd.run:
- name: chmod +s /usr/sbin/smartctl
- unless: test -u /usr/sbin/smartctl
- require:
- pkg: base-drive_health-smartmontools
base-drive_health-install-pysmart:
pip.installed:
- name: pysmart
- bin_env: /opt/datadog-agent/embedded/bin/pip
- user: dd-agent
- cwd: /opt/datadog-agent
# install the smartmon.py in the /etc/datadog-agent/checks.d directory
base-drive_health-install-pythoncode:
file.managed:
- name: /etc/datadog-agent/checks.d/smartmon.py
- source: salt://base/files/smartmon.py
- user: dd-agent
- group: dd-agent
- mode: 644
- require:
- pip: base-drive_health-install-pysmart
# install the smartmon.yaml in the /etc/datadog-agent/conf.d directory
base-drive_health-install-yaml:
file.managed:
- name: /etc/datadog-agent/conf.d/smartmon.yaml
- source: salt://base/files/smartmon.yaml
- user: dd-agent
- group: dd-agent
- mode: 644
- require:
- file: base-drive_health-install-pythoncode
# restart the datadog-agent service if changes are made
base-drive_health-restart-agent:
service.running:
- name: datadog-agent
- watch:
- file: base-drive_health-install-yaml
- file: base-drive_health-install-pythoncode
{% endif %}
small little contribution to your amazing contribution. Thanks!
from datadog-smartmon.
Related Issues (6)
- Got this error HOT 1
- Not compatible with datadog-agent V6 HOT 2
- Metric has non float value HOT 3
- Minor readme update HOT 1
- Smartpy not collect metric HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datadog-smartmon.