Windows Server - Textdatei durchsuchen

Guten Morgen. Ich habe es heute mal wieder getestet.
Ich bin wie folgt vorgegangen:

  1. mk_logwatch.py in C:\ProgramData\checkmk\agent\plugins\ abgelegt.
  2. logwatch.cfg in C:\ProgramData\checkmk\agent\config wie folgt konfiguriert:
D:\log\test.log 
 C error

Das Logfile wird in der Sektion nicht aufgelistet. (cmk -d servername)

Ein Blick in die check_mk.log führt folgenden Eintrag auf:

`Plugin 'C:\ProgramData\checkmk\agent\plugins\mk_logwatch.py'  is  sync with age:0 timeout:60 retry:0`

Wenn ich das Skript im Debug-Modus laufen lasse: mk_logwatch.py -d erscheint folgende Meldung:
  File "C:\ProgramData\checkmk\agent\plugins\mk_logwatch.py", line 1170, in <module>
    main()
  File "C:\ProgramData\checkmk\agent\plugins\mk_logwatch.py", line 1120, in main
    logfiles_config, cluster_config = read_config(files, args.debug)
  File "C:\ProgramData\checkmk\agent\plugins\mk_logwatch.py", line 387, in read_config
    config_lines = list(iter_config_lines(files, debug=debug))
  File "C:\ProgramData\checkmk\agent\plugins\mk_logwatch.py", line 327, in iter_config_lines
    raise IOError("Did not find any content in config files: %s" % ", ".join(files))
IOError: Did not find any content in config files: ./logwatch.cfg

OK, da ist der Pfad wohl nicht richtig definiert. Also habe ich die logwatch.cfg ins Plugin Verzeichnis kopiert und das Skript nochmal laufen lassen. Dann erscheint folgende Meldung:

<<<logwatch>>>
Traceback (most recent call last):
  File "C:\ProgramData\checkmk\agent\plugins\mk_logwatch.py", line 1170, in <module>
    main()
  File "C:\ProgramData\checkmk\agent\plugins\mk_logwatch.py", line 1132, in main
    found_sections, non_matching_patterns = parse_sections(logfiles_config)
  File "C:\ProgramData\checkmk\agent\plugins\mk_logwatch.py", line 989, in parse_sections
    logfile_refs = find_matching_logfiles(glob_pattern)
  File "C:\ProgramData\checkmk\agent\plugins\mk_logwatch.py", line 907, in find_matching_logfiles
    matches = list(glob.glob(glob_pattern))
  File "C:\Python27\lib\glob.py", line 16, in glob
    return list(iglob(pathname))
  File "C:\Python27\lib\glob.py", line 25, in iglob
    if os.path.lexists(pathname):
  File "C:\Python27\lib\genericpath.py", line 18, in exists
    os.stat(path)
TypeError: must be encoded string without NULL bytes, not str