event_spammer_4splunk

Simple utility to spam logs into Splunk for TS purposes.
git clone git://git.thepablogq.xyz/event_spammer_4splunk
Log | Files | Refs | README

log.sh (364B)


      1 #!/bin/bash
      2 
      3 case $((1 + $RANDOM % 3)) in
      4 
      5     1)
      6         MESSAGE="INFO running script return 0"
      7         ;;
      8 
      9     2)
     10         MESSAGE="INFO not relevant information"
     11         ;;
     12 
     13     3)
     14         MESSAGE="INFO SAMPLE_TEXT"
     15         ;;
     16 
     17     *)
     18         echo -n "unknown"
     19         ;;
     20      esac
     21 
     22 PRINTF=`printf "%s %s \n" $(date '+%Y/%m/%d %H:%M:%S') $MESSAGE`
     23 
     24 echo $PRINTF