/usr/sbin/bcfg2-report-collector is in bcfg2-server 1.4.0~pre2+git141-g6d40dace6358-1ubuntu1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #! /usr/bin/python
""" Daemon that runs to collect logs from the LocalFilesystem
Reporting transport object and add them to the Reporting storage
backend """
import sys
import logging
import Bcfg2.Logger
import Bcfg2.Options
import Bcfg2.DBSettings
from Bcfg2.Reporting.Collector import ReportingCollector, ReportingError
def main():
parser = Bcfg2.Options.get_parser(description="Collect Bcfg2 report data",
components=[ReportingCollector])
parser.parse()
logger = logging.getLogger('bcfg2-report-collector')
# run collector
try:
ReportingCollector().run()
except ReportingError:
msg = sys.exc_info()[1]
logger.error(msg)
raise SystemExit(1)
except KeyboardInterrupt:
raise SystemExit(1)
if __name__ == '__main__':
sys.exit(main())
|