Coder Social home page Coder Social logo

danielweeber / ansible-role-windows_exporter Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 7.0 16 KB

Ansible role - Windows exporter

Home Page: https://galaxy.ansible.com/danielweeber/windows_exporter

License: MIT License

ansible ansible-role monitoring prometheus windows-exporter

ansible-role-windows_exporter's Introduction

πŸ’« About Me:

πŸ”­ Ich arbeite an Automatisierung/Terraform/Ansible/HomeAssistant & Co
πŸ‘― Work Together fΓΌr Roles und Playbooks
πŸ’¬ Frag mich alles ΓΌber Automatisierung, Ansible, Gitlab, HomeAssistant & Co

πŸ’» Tech Stack:

Go JavaScript Markdown PHP PowerShell Python Shell Script YAML AWS Azure Cloudflare GithubPages Google Cloud Linode OVH Apache Nginx AmazonDynamoDB InfluxDB MariaDB MicrosoftSQLServer MongoDB MySQL Postgres Redis SQLite GitLab CI GitHub Actions TravisCI Git GitHub GitLab Cisco Confluence Docker ESLint ElasticSearch Grafana Home Assistant Kubernetes Mosquitto Packer Prometheus Rancher SonarQube Terraform Ubiquiti Vagrant Zigbee

πŸ“Š GitHub Stats:




ansible-role-windows_exporter's People

Contributors

brandonmcclure avatar danielweeber avatar dweebertwt avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ansible-role-windows_exporter's Issues

windows_exporter_options does not affect the install

When you specify the windows_exporter_options parameter when using this role the installer does not respect it/change the installation.

Desired state

specifying the role in a playbook like:

- role: windows_exporter
      windows_exporter_version: '0.18.1'
      windows_exporter_options: 'ENABLED_COLLECTORS=cpu,cs,logical_disk,memory,net,os,textfile,iis TEXTFILE_DIR=D:\metrics'

results in a installation that has the specific collectors enables, and the textfile directory set to the user specified location.
The readme would need to be updated to specify that you should use the MSI parameters as defined in the prometheus windows_exporter documentation here: https://github.com/prometheus-community/windows_exporter#installation

check settings

Hey!

Great job on this role.

Just one question: what happens if you want to update the settings of an existing windows_exporter?

So for example I had

windows_exporter_options: 'ENABLED_COLLECTORS="os,service,system"'

but now I want perhaps

windows_exporter_options: 'ENABLED_COLLECTORS="os,service,process,system"'

(or change the port maybe, etc.??)

As with the current logic that would lead to
is exporter installed -> yes -> skip install (regardless of the settings)

  • is there a way maybe to check the settings of exporter, and if it is not in the desired state, reinstall it?
  • for the time being - since my company just tests exporter on a few machines - I just put a sloppy workaround in, to reinstall exporter if it finds it...but that is not feasible for production, as it would mean each Ansible-run reinstalls it...

assert failed

Thank you for creating this great project.

By default, windows_exporter_state is started and windows_exporter_start_mode is delayed.

So the assertion will always fail. What is the assertion for?

windows_exporter_state != 'started' and windows_exporter_start_mode != 'disabled'

https://github.com/DanielWeeber/ansible-role-windows_exporter/pull/4/files#diff-3d0ff1709ca48add100327bb2a468e6c508fb92a159c64c4f99ad1df89d9bddeR2-R6

Error message:

    "assertion": "windows_exporter_state != 'started' and windows_exporter_start_mode != 'disabled'",
    "changed": false,
    "evaluated_to": false,
    "msg": "You cannot manage the service with the windows_exporter_state and windows_exporter_start_mode settings"

Control the service start_mode

Currently when you change the windows_exporter_state default variable, there is no change on the target machine.
Also, the service gets created with an Automatic start, but I have issues with it not starting after a system reboots. I want to be able to control the start_mode as well.

The way that I implemented this, is I removed the windows_exporter_enabled variable, and use the existing windows_exporter_state and a new windows_exporter_start_mode variable that are used to directly control the win_service task. I added a conditional check for the win_uri task, because if I disabled my service through these variables, then I would not want to check for the web service, becuase I expect it to not be running.

Optional firewall config

Would it be possible to add a new confirmation item making firewall task optional?

In my case, firewall is off, and there is no need to execute firewall task here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.