Section "Monitoring"

The settings in this section control the monitoring capabilities of kenaflow.

For details please read article Monitoring

usePerformanceCounter

    <entry key="usePerformanceCounter" type="System.Boolean" default="false"></entry>

kenaflow offers a basic set of performance counters that integrate into Windows OS and can be used locally on the kenaflow server using perfmon or with any third party monitoring that can leverage Windows performance counter.

With this setting the use of performance counters can be enabled or disabled (default).

WorkReportHookAddress

    <entry key="WorkReportHookAddress" type="System.String" default=""></entry>

kenaflow is able to report its work to a webhook for monitoring purpose.

With this setting you can specify a webhook that is able to receive kenflow work reports.

ClientStartReportHookAddress

    <entry key="ClientStartReportHookAddress" type="System.String" default=""></entry>

kenaflow uses sub processes for workflow execution and several other tasks.

Sub processes are started and/or restarted regulary.

This web hook can be used for monitoring purpose to inform a monitoring system about the start of sub processes.

PingICMP

    <entry key="PingICMP" type="System.String" comment="[ip/host]|[time-between]|[max-ok-latency-msec]|[stop-after-failed-count]|return-to-normal-after-count]~..."></entry>

kenaflow is able to monitor other network related devices to check its connectivity.

Here you can specify zero, one or more devices that have to be available over ICMP ping to infornm kenaflow about network connectivity.

One entry consists of this settings, separated by | (pipe character):

  • IP address or host name
  • time between two ICMP pings (in milliseconds)
  • maximum latency (in milliseconds)
  • mark this entry (device) as "failed" (= not reachable / disconnected) after this number of failures
  • mark this entry (device) as "normal" (= reachable / connected) after this number of successful ping AFTER it's in "failed" state

Sample for two entries: 172.16.1.1|5000|1|5|5~domaincontroller2.company.local|5000|1|5|5

PingWebHook

    <entry key="PingWebHook" type="System.String" comment="[url]|[time-between]|[expected-http-status-code]|[stop-after-failed-count]|return-to-normal-after-count]~..."></entry>

kenaflow is able to monitor other network related devices to check its connectivity.

Here you can specify zero, one or more devices that have to be available over HTTP web request to infornm kenaflow about network connectivity.

One entry consists of this settings, separated by | (pipe character):

  • URL to web resource
  • time between two HTTP request (in milliseconds)
  • desired HTTP response status code
  • mark this entry (device) as "failed" (= not reachable / disconnected) after this number of failures
  • mark this entry (device) as "normal" (= reachable / connected) after this number of successful ping AFTER it's in "failed" state

Sample for two entries: http://ping1.company.local|5000|200|5|5https://172.16.1.1|5000|200|5|5

StopCountFailedPings

    <entry key="StopCountFailedPings" type="System.Int32" comment="how much ping conditions must fail from setting above before pausing the engine?" default="1"></entry>

The settings determine the number of ping tests that must fail before kenaflow stops work.

It must be >= 1.

It is not used if there is no setting for PingICMP and/or PingWebHook.

ErrorWebHook

    <entry key="ErrorWebHook" type="System.String" comment="[url]|[level: (+)0=waring, 1=error, 2 = critical]|['get' or 'post']~...">http://127.0.0.1:3000/|+1|post</entry>

In case of (critical) errors or warnings this web hook setting can be used to contact a IT monitoring system.

Such a web hook is defined by an URL, a log level and a HTTP method.

The URL ist the address of your monitoring system.

The log level defines the level of messages that have to be reported:

  • 0 = Warning
  • 1 = Error
  • 2 = Critical Error

Using + before the level the level ist interpreted as "at least" / >=.

Example:

  • +1 means Error or Critical Error.
  • 0 (without +) means: Warning

The method can be used to send error data or just a ping with no data.

Method:

  • GET: just ping the web hook
  • POST: send error data to the web hook

The sended data contains information about the error. The following information is separated by CRLF characters

  • Timestamp in format yyyy-MM-dd HH:mm:ss
  • LogLevel as string
  • Process Id (Windows process of kenaflow.exe)
  • Thread Id
  • Message

The message can have multiple lines that are separated by CRLF.

Sample web hook:

http://127.0.0.1:3000/|+1|post

Multiple hooks can be defined by separating them using ~.

Example: You could have separate hooks for 1) warnings and 2) (critical) errors.

http://127.0.0.1:3000/|0|post~http://127.0.0.1:4000/|+1|post

FreeDiskSpaceDrives

    <entry key="FreeDiskSpaceDrives" type="System.String" comment="example: 'C:;D:'. separated by ;" default="">C:;R:</entry>

This setting can be used to enable free disk space monitoring.

One or more drives to monitor can be specified here.

if the available memory of the specified drives is below the amount of memory as specified in FreeDiskSpaceThreshold kenaflow will not start new sub processes.

Already running child processes will terminate themselves if the free disk space is below FreeDiskSpaceThreshold for more than 5 minutes.

The main process of kenaflow (started with --run) will not terminate but does not start any sub processes.

FreeDiskSpaceThreshold

    <entry key="FreeDiskSpaceThreshold" type="System.Int32" comment="in megabyte!" default="500"></entry>

If drives are specified in FreeDiskSpaceDrives and this feature is activated the free space threshold is specified in this setting.

Amount of free disk space in MEGABYTES!

FreeDiskSpaceWebHook

    <entry key="FreeDiskSpaceWebHook" type="System.String" comment="[url]|~...">http://127.0.0.1:3000/</entry> <!--http://127.0.0.1:3000/-->

This setting can be used to ping one or more web hook(s) in case of free space is running out. The ping is send every 30 seconds while free disk space is below FreeDiskSpaceThreshold.

Currently there is no info send about the drive that is running out of free disk space.

Example for hook

http://127.0.0.1:3000/

Multiple web hooks can be separated by ;

Example for two wb wooks:

http://127.0.0.1:3000/~http://127.0.0.1:4000/

Full Section Default

  <section name="monitoring">
    <entry key="usePerformanceCounter" type="System.Boolean" default="false"></entry>
    <entry key="WorkReportHookAddress" type="System.String" default=""></entry>
    <entry key="ClientStartReportHookAddress" type="System.String" default=""></entry>
    <entry key="PingICMP" type="System.String" comment="[ip/host]|[time-between]|[max-ok-latency-msec]|[stop-after-failed-count]|return-to-normal-after-count]~..."></entry>
    <entry key="PingWebHook" type="System.String" comment="[url]|[time-between]|[expected-http-status-code]|[stop-after-failed-count]|return-to-normal-after-count]~..."></entry>
    <entry key="StopCountFailedPings" type="System.Int32" comment="how much ping conditions must fail from setting above before pausing the engine?" default="1"></entry>
    <entry key="ErrorWebHook" type="System.String" comment="[url]|[level: (+)0=waring, 1=error, 2 = critical]|['get' or 'post']~...">http://127.0.0.1:3000/|+1|post</entry>
    <entry key="FreeDiskSpaceDrives" type="System.String" comment="example: 'C:;D:'. separated by ;" default="">C:;R:</entry>
    <entry key="FreeDiskSpaceThreshold" type="System.Int32" comment="in megabyte!" default="500"></entry>
    <entry key="FreeDiskSpaceWebHook" type="System.String" comment="[url]|~...">http://127.0.0.1:3000/</entry> <!--http://127.0.0.1:3000/-->
  </section>

Discussion