Legacy Manual

Event - Log to file


The "Log to file" alert writes data to a text file whenever alert conditions are met.

Log times for entire route?

This option specifies if you want to write data to the text file just for the monitored host, or the entire route. Leaving this off means that for each time alert conditions are met, one data item will be written to the file – for the monitored host.  If the switch is turned on, then data for the entire route will be written.

Filename:

The filename is *required* to have the $host variable in it (or some variable that changes depending on which host / target is being logged).  If it is missing, then the file will be nonsensical if you attach this alert to more than one host.  The following variables can be used as part of the filename.  Note there is no way to "escape" the following sequences, so these are always parsed and can't be specified as literals in the filename.

$dest The target destination's name (or IP Address if the IP didn't resolve to a name). This is different than $host because an alert might be attached to an intermediate hop, whose information is accessed via the $host variable(s).  The final destination, though, is accessed via the $dest variable(s).
$destip The destination IP address
$destname The resolved DNS name for the destination
$config The name of the configuration used when tracing the target in question.  This is useful when you're using multiple configurations and want to be able to distinguish between them and the target name / IP isn't enough.  The $settings name is also equivalent to $config - either can be used interchangeably.
$host Host name (or IP address, if no name exists).  If used in an alert on a non-target hop, the alerting hop's information will be used.
$hostip The host IP address
$hostdnsname The resolved DNS name for the host
$year Current Year
$month Current Month
$day Current day of month
$hour Current hour
$minute Current minute
$second Current second
$date Same as $year-$month-$day.
$time The same as $hour$minute - note the absence of any punctuation - that's to make sure the file name is valid, if this mask is being used in a file name.

Starting with PingPlotter 3.40, directories will be created to any depth needed to satisfy your file name (prior to this version, only one level of depth was created).  If you specify c:\ppdata\$year\$month\$day\$host\$host data for $day.log, then each directory level will be created.