This file is indexed.

/usr/sbin/bcfg2-report-collector is in bcfg2-server 1.3.3-1ubuntu3.

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
33
34
35
36
37
#! /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
from Bcfg2.Reporting.Collector import ReportingCollector, ReportingError


def main():
    logger = logging.getLogger('bcfg2-report-collector')
    optinfo = dict(daemon=Bcfg2.Options.DAEMON,
                   repo=Bcfg2.Options.SERVER_REPOSITORY,
                   filemonitor=Bcfg2.Options.SERVER_FILEMONITOR,
                   web_configfile=Bcfg2.Options.WEB_CFILE)
    optinfo.update(Bcfg2.Options.CLI_COMMON_OPTIONS)
    optinfo.update(Bcfg2.Options.REPORTING_COMMON_OPTIONS)
    setup = Bcfg2.Options.OptionParser(optinfo)
    setup.parse(sys.argv[1:])

    # run collector
    try:
        collector = ReportingCollector(setup)
        collector.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())