Skip to content

Commit

Permalink
Merge pull request #5357 from wazuh/enhancement/add-timestamp-to-inde…
Browse files Browse the repository at this point in the history
…xer-statistics

Add timestamp to indexer statistics
  • Loading branch information
juliamagan authored May 13, 2024
2 parents a8008d9 + b417f4b commit 5fc3fbc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file.

### Added

- Add `Timestamp` field to the indexer statistics ([#5357](https://github.com/wazuh/wazuh-qa/pull/5357)) \- (Framework)
- Add `GeneratorVulnerabilityEvents` in agent simulator ([#5265](https://github.com/wazuh/wazuh-qa/pull/5265)) \- (Framework)
- Add functionality to obtain statistics and metrics from the indexer ([#5090](https://github.com/wazuh/wazuh-qa/pull/5090)) \- (Framework)
- Add support for the installation/uninstallation of npm packages ([#5092](https://github.com/wazuh/wazuh-qa/pull/5092)) \- (Tests)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,12 +342,14 @@ def _write_csv(self, data, target, csv_file):
))
elif target == "vulnerabilities":
logger.info("Writing vulnerabilities data info to {}.".format(csv_file))
log.write(("{0}\n").format(
log.write(("{0},{1}\n").format(
timestamp,
data
))
elif target == "alerts":
logger.info("Writing alerts data info to {}.".format(csv_file))
log.write(("{0}\n").format(
log.write(("{0},{1}\n").format(
timestamp,
data
))
elif target == "remote":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,11 @@
"Number of messages",
"Number of events buffered"]

vulns_header = ["Total vulnerabilities"]
vulns_header = ["Timestamp",
"Total vulnerabilities"]

alerts_header = ["Total alerts"]
alerts_header = ["Timestamp",
"Total alerts"]


wazuhdb_header = ["Timestamp",
Expand Down

0 comments on commit 5fc3fbc

Please sign in to comment.