Пример #1
0
import os
import sys

sys.path.append('/tools')

from healthcheck_utils import get_agent_health_base

if __name__ == "__main__":
    exit(
        os.system(
            "grep -q 'sca: INFO: Security Configuration Assessment scan finished.' /var/ossec/logs/ossec.log"
        ) or get_agent_health_base())
Пример #2
0
import os
import sys
sys.path.append('/tools')

from healthcheck_utils import get_agent_health_base


def get_health():
    output = os.system(
        "grep -q 'syscheckd: INFO: (6009): File integrity monitoring scan ended.' /var/ossec/logs/ossec.log"
    )

    if output == 0:
        return 0
    else:
        return 1


if __name__ == "__main__":
    exit(get_health() or get_agent_health_base())