Quantcast
Channel: THWACK: Message List - Kiwi Syslog
Viewing all articles
Browse latest Browse all 2141

Re: Klog? - Sending syslogs from scripts, batch files, etc

$
0
0

I'll put this out there in case anyone wants to use Klog. Copy/Paste the code below into notepad and save it as YOURNAME.bat 

This is an example of how to use Klog to send a trap. Here is the syntax klog -h 10.157.148.152 -l 2 -m "Alert-This is the alert message I want to send"

The code below will send a trap to your destination about every 15 seconds... forever.

I use this for testing messages. 

 

Code:

********************************************************************************************************************

Rem this is used to send a syslog message repeatedly, about every 15 seconds for testing purposes.

Rem beginning of loop

:again

Rem Syslog Levels:

Rem

Rem 1-Alert

Rem 2-Critical

Rem 3-Error

Rem 4-Warning

Rem 5-Notice

Rem 6-Informational

Rem 7-Debug

Rem For syntax use klog -?

Rem Usage: klog -u <port> -h <host> -p <priority> -f <facility no> -l <level no> -F

Rem <facility name> -L <level name> -r <process name> -t -w -s -m "Message to send"

Rem -h is the host you want to send to

Rem -l is the level above, in this case critical

Rem -m is the message, must be inside of double quotes

klog -h 10.157.148.152 -l 2 -m "Alert-This is the alert message I want to send"

rem this is just puttig about 15 second pause in the script

ping -n 15 127.0.0.1 > nul

Rem go back to the top of the loop

goto again


Viewing all articles
Browse latest Browse all 2141

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>