Skip to content

DataProphet/wazuh-exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wazuh Prometheus Exporter

This exporter gathers basic Wazuh manager and agent metrics using the Wazuh REST API and exposes them for Prometheus scraping.


Environment Variables

Set the following variables to configure the exporter:

Variable Description Required Default
WAZUH_API_URL Base URL to the Wazuh API Yes
WAZUH_USER API username Yes
WAZUH_PASS API password Yes
PORT Port to expose Prometheus metrics No 9115
SCRAPE_INTERVAL API scrape interval in seconds No 30

Example:

export WAZUH_API_URL="https://wazuh.example.com:55000"
export WAZUH_USER="monitor"
export WAZUH_PASS="secret"
export PORT=9115
export SCRAPE_INTERVAL=20

Running

Start the exporter:

python wazuh_exporter.py

Metrics will be available at:

http://localhost:<PORT>/metrics

Running as a Docker Container

A Dockerfile is included in the repository, you can build and run the exporter as a container:

# Build the Docker image
docker build -t wazuh-exporter .

# Run the container with environment variables
docker run -d \
  -e WAZUH_API_URL="https://wazuh.example.com:55000" \
  -e WAZUH_USER="monitor" \
  -e WAZUH_PASS="secret" \
  -e PORT=9115 \
  -e SCRAPE_INTERVAL=30 \
  -p 9115:9115 \
  wazuh-exporter

Metrics will then be available at http://localhost:9115/metrics.


Disclaimer

The code was generated by an AI model and may contain errors, omissions, or non-optimal patterns. Review and test thoroughly before deploying in production.

About

A prometheus exporter for Wazuh

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors