Page 1 of 1

[RESOLVED] audit-host package

Published: November 21, 2024 - 4:51 PM
by Gaetan
Good morning,

in the logic of packets audit-dmi And audit -wmi I propose this package:

Code: Select all

# -*- coding: utf-8 -*-
from setuphelpers import *


def install():
    pass


def audit():
    try:
        data_host_info = host_info()
    except Exception as e:
        data_host_info = {"status": str(e)}
    WAPT.write_audit_data_if_changed("audit-host", "audit-host", data_host_info)
    return "OK"
It allows information about the host to be retrieved in audit data.

This can be used, for example with this request

Re: audit-host package

Published: November 25, 2024 - 3:34 PM
by fschelfaut
Hello,

thank you very much for this code snippet; we'll look into integrating it into the WAPT package catalog!
Note that currently, the host_info section is still retrieved by WAPT, unlike WMI and DMI.

Flavien,

Re: audit-host package

Published: Dec 2, 2024 - 12:11
by dcardon
@Flavien,

I think the idea behind this package and its main purpose is to preserve the history of host_info() and be able to track changes.

Thanks Gaëtan for sharing :-)

. I'm marking the topic as resolved.

Denis