Xymon Mailing List Archive search

Newbie windows client problem with powershell script

3 messages in this thread

list Johan Eloff · Thu, 5 Feb 2009 22:09:17 +0200 ·
Hi
 
I am very new to Hobbit and thus do not know its ins and outs very much. My server is running and is reporting perfectly and I have several windows clients reporting to it 100%
I have a problem with a powershell script that I wrote and I don't know where to start looking. To sum it up, the script just counts the files in some folders and if the count is above the threshold set, output a text file to the bbwin\tmp folder with the status red and then the file count. The file doesn't have an extension and the script does work perfectly and repots the file count correctly. My problem is that the windows client does remove the file as if importing / sending it to hobbit but nothing appears in the web console with regards to status etc.
 
When I copy the text from the file, manually create a text file (without extension) and paste the exact same text in there it's also removed but then the web console is updated with the status etc. so the text in the file is perfect I assume then. I can only think that powershell creates the file in some weird way that hobbit doesn't like. Where can I check on the client or server what actually happens to the file or what is wrong with it when hobbit "imports" it?
 
Regards
 
Johan

This email and its contents are subject to an email legal notice that can be viewed at: http://www.naspers.com/email/disclaimer.html. Should you be unable to access the link provided, please email us for a copy at user-275e8f00341e@xymon.invalid. 
Hierdie e-pos en sy inhoud is onderhewig aan 'n regskennisgewing oor elektroniese pos wat gelees kan word by http://www.naspers.com/epos/vrywaring.html. 'n Afskrif kan aangevra word by user-275e8f00341e@xymon.invalid. 
list Graeme A Shea · Fri, 6 Feb 2009 07:51:10 +1100 ·
The first thing I can think about is either Unicode problems or the
CR/LF issue I have come across a couple of times. Try manually adding
the CR/LF characters in the script rather than just a new line and see
if that helps.

 
I have been writing my scripts in VBS and that works ok but have found
BBWin is very fussy about having the information in the first line in
exactly it's correct format.

 
Another option is try the Mr Big client and see if that works for you.

 
Regards

Graeme 

 
From: Johan Eloff [mailto:user-9703f8961d13@xymon.invalid] 
Sent: Friday, 6 February 2009 7:09 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] Newbie windows client problem with powershell script
Importance: High
quoted from Johan Eloff

 
Hi

 
I am very new to Hobbit and thus do not know its ins and outs very much.
My server is running and is reporting perfectly and I have several
windows clients reporting to it 100%

I have a problem with a powershell script that I wrote and I don't know
where to start looking. To sum it up, the script just counts the files
in some folders and if the count is above the threshold set, output a
text file to the bbwin\tmp folder with the status red and then the file
count. The file doesn't have an extension and the script does work
perfectly and repots the file count correctly. My problem is that the
windows client does remove the file as if importing / sending it to
hobbit but nothing appears in the web console with regards to status
etc.

 
When I copy the text from the file, manually create a text file (without
extension) and paste the exact same text in there it's also removed but
then the web console is updated with the status etc. so the text in the
file is perfect I assume then. I can only think that powershell creates
the file in some weird way that hobbit doesn't like. Where can I check
on the client or server what actually happens to the file or what is
wrong with it when hobbit "imports" it?

 
Regards

 
Johan


This email and its contents are subject to an email legal notice that
can be viewed at: http://www.naspers.com/email/disclaimer.html. Should
you be unable to access the link provided, please email us for a copy at
user-275e8f00341e@xymon.invalid. 

Hierdie e-pos en sy inhoud is onderhewig aan 'n regskennisgewing oor
elektroniese pos wat gelees kan word by
http://www.naspers.com/epos/vrywaring.html. 'n Afskrif kan aangevra word
by user-275e8f00341e@xymon.invalid. 


Important - This email and any attachments may be confidential. If received in error, please contact us and delete all copies. Before opening or using attachments check them for viruses and defects. Regardless of any loss, damage or consequence, whether caused by the negligence of the sender or not, resulting directly or indirectly from the use of any attached files our liability is limited to resupplying any affected attachments. Any representations or opinions expressed are those of the individual sender, and not necessarily those of the Department of Education and Early Childhood Development.
list Johan Eloff · Fri, 6 Feb 2009 12:50:32 +0200 ·
Thanks Graeme

 
That was spot on. I check the output file from powershell with dos
editor and it had funny characters in. I changed the script to output
the file in ASCII format and it is working perfectly now.

 
Thanks a lot for help!!
quoted from Graeme A Shea

 
Johan 

This email and its contents are subject to an email legal notice that can be viewed at: http://www.naspers.com/email/disclaimer.html. Should you be unable to access the link provided, please email us for a copy at user-275e8f00341e@xymon.invalid. Hierdie e-pos en sy inhoud is onderhewig aan 'n regskennisgewing oor elektroniese pos wat gelees kan word by http://www.naspers.com/epos/vrywaring.html. 'n Afskrif kan aangevra word by user-275e8f00341e@xymon.invalid. ------------------------------------------------------------------------------------