Hello,
We have a script in Windows as:
net stop service
echo Stopped > log
Nagios nrpe shows an "ERROR incompatible to redirect entries"
Thanks
.bar command in Windows do not redirect to a file
-
FCC_Nagios_Support
- Posts: 161
- Joined: Tue Mar 10, 2020 11:07 am
Re: .bar command in Windows do not redirect to a file
Hi,
How are you doing?
What "service" are you stopping in the batch script?
See if you have permission to write to "C:\Program Files\NSClient++\" folder.
Maybe you could try writing the "log" to different location (folder).
I tested this on my NSClient++ and looks like it is working for me.
I created a simple "check_workstation_stat.bat" and put that under the NSClient++ "scripts" folder:
Here's the content of "check_workstation_stat.bat":
I then "ran" the script on my XI command prompt:
And here's the "Vinhlog" file under "C:\Program Files\NSClient++\" folder:
The "check_workstation_stat.bat" script was able to created the "Vinhlog" file ... (please see picture below).
Best Regards,
Vinh
How are you doing?
What "service" are you stopping in the batch script?
See if you have permission to write to "C:\Program Files\NSClient++\" folder.
Maybe you could try writing the "log" to different location (folder).
I tested this on my NSClient++ and looks like it is working for me.
I created a simple "check_workstation_stat.bat" and put that under the NSClient++ "scripts" folder:
Code: Select all
C:\Program Files\NSClient++\scripts\check_workstation_stat.batThe "check_workstation_stat.bat" script was able to created the "Vinhlog" file ... (please see picture below).
Best Regards,
Vinh
You do not have the required permissions to view the files attached to this post.
-
FCC_Nagios_Support
- Posts: 161
- Joined: Tue Mar 10, 2020 11:07 am
Re: .bar command in Windows do not redirect to a file
Many thanks Vihn.
Good with PowerShell
KR
Good with PowerShell
KR
Re: .bar command in Windows do not redirect to a file
Great!! .... May I close this thread?
Regards,
Vinh
Regards,
Vinh