-
Notifications
You must be signed in to change notification settings - Fork 1
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
Dbp 1037 setup privacyidea monitring #140
base: master
Are you sure you want to change the base?
Conversation
…t handlers for various events
@@ -63,3 +63,4 @@ | |||
path: "/tmp/certificate_sync_key_*" | |||
state: absent | |||
delegate_to: localhost | |||
ignore_errors: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason for ignoring errors here?
# args: | ||
# executable: /bin/bash | ||
# notify: restart uwsgi | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason for commenting this out? There is a when condition in the main.yml so it would only be executed if privacyidea_execute_data_import is true.
- name: Install prometheus_client in PrivacyIDEA | ||
ansible.builtin.command: | ||
cmd: sudo -H /opt/privacyidea/virtualenv/bin/pip install prometheus_client | ||
become: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be the ansible pip module could be more elegant here? I think it supports virtualenvs.
|
||
def check_auth(username, password): | ||
"""Check if a username/password combination is valid.""" | ||
return username == EXPORTER_USERNAME and password == EXPORTER_PASSWORD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this could potentially be vulnerable for timing attacks.
Maybe we could use a hash and standard method from bcrypt instead?
Description
This PR focuses on creating a robust monitoring setup for PrivacyIDEA by developing a custom exporter that collects vital statistics from PrivacyIDEA's database and exposes them in a format that Prometheus can scrape.
Custom Exporter Configuration
The custom exporter will follow this chain of communication: