Hello List,
I am trying to get a hang with file.accumulated, but keep getting this error: “Unable to manage file: Jinja variable 'accumulator' is undefined”.
The execution log, however, clearly states that the accumulator had been “charged”:
----------
ID: nrpe-backupchecks___checkbe_combm202-inc
Function: file.accumulated
Name: bakcmd
Result: True
Comment: Accumulator bakcmd for file C:/program files/NSclient++/nsclient.d/nrpe-backupchecks.ini was charged by text
Changes:
----------
ID: nrpe-backupchecks___checkbe_comts02-inc
Function: file.accumulated
Name: bakcmd
Result: True
Comment: Accumulator bakcmd for file C:/program files/NSclient++/nsclient.d/nrpe-backupchecks.ini was charged by text
Changes:
----------
ID: nrpe-backupchecks___checkbe_comts02-full
Function: file.accumulated
Name: bakcmd
Result: True
Comment: Accumulator bakcmd for file C:/program files/NSclient++/nsclient.d/nrpe-backupchecks.ini was charged by text
Changes:
----------
ID: nrpe-backupchecks.ini
Function: file.managed
Name: c:/program files/nsclient++/nsclient.d/nrpe-backupchecks.ini
Result: False
Comment: Unable to manage file: Jinja variable 'accumulator' is undefined; line 11
---
[...]
#
[/settings/external scripts/scripts]
{% for line in accumulator['bakcmd'] %} <======================
{{ line }}
{% endfor %}
---
Changes:
What might I be doing wrong?
Thanks for reading! Best, Sven.