Solution
"Eikelenboom, Hans" <Heikelenboom@alphenaandenrijn.nl>schreef:
Hello Jens,
I Solved the problem after reading other topics I noticed that notepad.exe has started on that machine.
After replacing the ps1 file to another location everything works ok.
This is my config.
<<<check_mk>>>
Version: 1.1.11i1
AgentOS: windows
WorkingDirectory: C:\Windows\system32
ConfigFile: c:\Check_MK_Latest\check_mk.ini
AgentDirectory: c:\Check_MK_Latest
PluginsDirectory: c:\Check_MK_Latest\plugins
LocalDirectory: c:\Check_MK_Latest\local
ScriptDir:c:\Check_MK_Latest\PwShell
Placing the cmd in the local dir and the script in the ScriptDir
Thanks for your support.
Hans
···
________________________________
Van: Fritsch, Jens [mailto:jens.fritsch@logica.com]
Verzonden: dinsdag 23 augustus 2011 19:37
Aan: Eikelenboom, Hans; Lars Michelsen; Checkmk-en
Onderwerp: AW: [Check_mk (english)] agent for windows and Powershell scripts/agent error 1067
Hi Hans,
Could you send the content of the files (batch and ps) please?
cu Jens
-----Ursprüngliche Nachricht-----
Von: Eikelenboom, Hans [mailto:Heikelenboom@alphenaandenrijn.nl]
Gesendet: Di 23.08.2011 18:07
An: Eikelenboom, Hans; Fritsch, Jens; Lars Michelsen; Checkmk-en
Betreff: RE: [Check_mk (english)] agent for windows and Powershell scripts/agent error 1067
Sorry i was to fast.
Hi all,
I have the scripts installed on a w2k8 64.
When I launch the bat file in a command window everything works fine.
I have copied in the c: \ check_mk \ plugins \ memcheck.bat and ps1 file in
the c: \ check_mk \ Pwshell.
Memcheck.bat then adjusted to the proper dir.
If I CMK-D output windows host, I miss the local check.
Do I have something else to get it working.
Kind regards
H. Eikelenboom
Verzonden vanaf mijn HTC
----- Oorspronkelijk bericht -----
Van: Eikelenboom, Hans <Heikelenboom@alphenaandenrijn.nl>
Verzonden: dinsdag 23 augustus 2011 17:17
Aan: Fritsch, Jens <jens.fritsch@logica.com>; Lars Michelsen <lm@mathias-kettner.de>; Checkmk-en <checkmk-en@lists.mathias-kettner.de>
Onderwerp: Re: [Check_mk (english)] agent for windows and Powershell scripts/agent error 1067
Hi all,
I have copied the scripts to a w2k8 64.
Verzonden vanaf mijn HTC
----- Oorspronkelijk bericht -----
Van: Fritsch, Jens <jens.fritsch@logica.com>
Verzonden: maandag 22 augustus 2011 9:27
Aan: Lars Michelsen <lm@mathias-kettner.de>; checkmk-en@lists.mathias-kettner.de <checkmk-en@lists.mathias-kettner.de>
Onderwerp: Re: [Check_mk (english)] agent for windows and Powershell scripts /agent error 1067
Hi Lars,
update / fyi:
I tryed the agent on a windows host since 4 days . The windows agent works fine mostly (~90%). I had a few known issues (error 1067), If I use own powershell scripts with syntax/code errors (therefore is a plugin test on a test system always important (: ).
But I think so, the function with ps1 files of the agent is fine now.
Currently I have another problems with powershell scripts and the check_mk_agent. The check_mk agent calls powershell.exe(32bit) for the ps1 scripts (standard). But the PSSnapin for MS Exchange2010 works only with powershell.exe 64bit. This observation is very interesting for monitoring MS Exchange 2010 server. I will open a new mailing thread for this issue.
Thanks Lars for your quick help and agent-modification.
Thanks Lars for your quick help and agent-modification.
configuration details:
Windows host:
- Windows 2008 R2 64bit server (with all MS Exchange 2010 roles for test)
- plugins; batch and powershell scripts
<<<check_mk>>> (agent)
Version: 1.1.11i2
AgentOS: windows
WorkingDirectory: C:\Windows\system32
ConfigFile: c:\Program Files (x86)\check_mk\check_mk.ini
AgentDirectory: c:\Program Files (x86)\check_mk
PluginsDirectory: c:\Program Files (x86)\check_mk\plugins
LocalDirectory: c:\Program Files (x86)\check_mk\local
________________________________
Von: checkmk-en-bounces@lists.mathias-kettner.de im Auftrag von Lars Michelsen
Gesendet: Do 18.08.2011 20:12
An: checkmk-en@lists.mathias-kettner.de
Betreff: Re: [Check_mk (english)] agent for windows and Powershell scripts / agent error 1067
Hello List,
I applied the change to the current git HEAD. Please give it a go and
give feedback if you experience any problems.
I hardcoded the following call for .ps1 scripts:
powershell.exe -NoLogo -ExecutionPolicy RemoteSigned "& '<ps1-path>'"
Regards,
Lars
On 18/08/11 12:05, Lars Michelsen wrote:
Hello List,
FYI: I have a pending change to the agent in progress. Still need to test
something.
Will push it today in the evening if everything works well.Regards,
LarsOn Thu, 18 Aug 2011 08:24:37 +0200, "Fritsch, Jens" > <jens.fritsch@logica.com> wrote:
Hi Sebastian,
regard error 1067 (check_mk_agent service start):
The hint "notepad.exe" is the solution. I tryed it and it works.
fyi (for all):
1) mv powershell script with mistakes in the check_mk_agent
plugin-directory
2) after that has the check_mk_agent problems
3) I try stop the check_mk_agent (but it doesn't work).
4) I kill the process with the command "Stop-Process -Id xxx" (Win 2008R2)
5) check via command netstat: port 6556 = Close_Wait
6) I check the windows-taskmanager and saw the process notepad.exe(32bit)
7) I killed this process
8) and I start the check_mk_agent again -> and worksThanks a lot for the hint!
Jens________________________________
Von: checkmk-en-bounces@lists.mathias-kettner.de im Auftrag von
Sebastian
Talmon
Gesendet: Do 18.08.2011 00:11
An: checkmk-en@lists.mathias-kettner.de
Betreff: Re: [Check_mk (english)] agent for windows and Powershellscripts
/ agent error 1067
Hello Jens,
1) Can I use Powershell-Scripts with windows check_mk_agent? Or works
only vbs
and batch scripts?
2) Is the problem known?: If I wrote a script with mistakes(inadvertent
),
after that hangs the agent. I can't stop the agent. I can only do itvia
command line and "taskkill". And after that I don't can start the agent
(I get
an error: 1067). At the moment I must reboot the host. Has someone the
sameyes, you could use powershell-scripts with the windows agent.
The problem is, that the file-extension for powershell-scripts is
associated
with the "Editor" as the default action - so check_mk runs notepad.exe
instead of powershell.exe for this script.Could you check if you have "notepad.exe" tasks in your process list /
task list?I've had the same problem (powershell script plus hanging agent) just a
few
hours ago.
Killing all notepad.exe processes solved the CLOSE_WAIT-problem on
port 6556 and let us (re)start the check_mk agent(move any powershell-script away from the plugin-directory if you do
not want to get stuck again a few minutes later)Greetings
Sebastian
_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-enThink green - keep it on the screen.
This e-mail and any attachment is for authorised use by the intended
recipient(s) only. It may contain proprietary material, confidential
information and/or be subject to legal privilege. It should not becopied,
disclosed to, retained or used by, any other party. If you are not an
intended recipient then please promptly delete this e-mail and any
attachment and all copies and inform the sender. Thank you.
_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en
Think green - keep it on the screen.
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en
Think green - keep it on the screen. This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.