This one has come up in these forums a few times.

I've been toying with the idea of using KiXtart as a scripting language for Nagios nrpe_nt. Unfortunately the plugins are required to output to the standard console window (not Ruud's emulation of the same).

At the moment I have to use workarounds like this:

code:
REM cpu.cmd
@echo off
c:\kixtart\kix32 c:\nrpe_nt\cpu.kix
type c:\nrpe_nt\cpu.txt

code:
; cpu.kix

$speed=@MHz
$phys=MemorySize(0)
$sp=""
If $speed <> 0
$sp="$speed"+"MHz "
endif

$out=$sp+"@CPU $phys"+"MB RAM"+@CRLF

$x=redirectoutput("c:\nrpe_nt\cpu.txt",1)
$out

when all I want to do is write to stdout!

Arrrgh!

Ruud, this would be so useful!

We could then do

code:
kix32 stuff.kix > kixout.txt

or better still
code:
kix32 stuff.kix | fancyprogram.exe

Please please please give us a simple and effective way of writing to the real CON from KiXtart.

Thanks in advance (but not holding my breath)

Phil

[ 03. June 2003, 14:10: Message edited by: PRandal ]