Unsolved
This post is more than 5 years old
9 Posts
0
78108
August 6th, 2015 12:00
OME alert application launch not working on Windows 2008 R2
I've been working this issue for a few days, even had our Windows Sysadmin at our company take a look. Windows is somehow preventing OME from launching an application (i.e. calling a batch script) in response to an alert. I can run the script manually on the command line and it works. However when I provide the full path of the script to OME to run the script as an "Alert Application Launch" it does not work. It appears on the surface that something in Windows is blocking the OME application from running this script.
If there's a known remedy for this issue please somebody point me in the right direction. I've reconfigured the user ownership on the script, I've altered the OME applications (DSM*) to run under a local account with admin privileges as opposed to the default - running under the System account. I normally work with Linux so I'm not a Windows expert but as mentioned I received help from our Windows admin and he could not figure it out.
Description:
running batch file manually on command line: works fine, all expected results
providing full path of batch file to OME as an Alert Application Launch and testing : no results, only indications in the Windows Event Viewer under Application Logs of the following - "A device or program has requested your attention. Device or application: C:\Windows\system32\cmd.exe." Of course no further details are provided (lovely, Microsoft).
Thanks,
Dan
DELL-Martijn G
291 Posts
0
August 7th, 2015 03:00
Could you provide an overview of your script settings (path, arguments, etc) and what you are trying to accomplish with it?
Dan_Chicago
9 Posts
0
August 12th, 2015 07:00
Hi Martin,
Thank you for your response. The details:
- Windows 2008 R2 server running OpenManage Essentials version 2.0.1.2222
- Attempting to launch script via a feature in OME called "Alert Application Launch"
- Alert Application Launch calls upon the script 'call_nsca_from_ome.bat', designed by me to pass the necessary parameters to another script 'send_nsca.exe' (I've hardcoded certain values for testing purposes). Important to note this script executes fine if run manually from the command line. Script altered to remove values from within our environment, replaced with descriptors placed between <>:
@ECHO OFF
SET nagios=
ECHO ;Memory;1;Test | C:\send_nsca.exe -H %nagios% -d ";"
- 'call_nsca_from_ome.bat' in turn passes the appropriate parameters to 'send_nsca.exe'. NSCA = nagios service check acceptor, a binary script downloaded from the Internet to allow OME to pass health information on remote servers to a nagios instance running in the same subnet (we're not crossing any firewalls here). As this is a binary I can't provide details on the inner workings of the script. However it's important to note that I can execute this script manually from the command line.
In creating this posting I was hoping that Dell was aware of this issue, or that someone else had recently experienced it, and there would be a known solution. I suspect the failure of OME to call upon the script is based somewhere in Windows security settings - obviously Windows is taking precautions in terms of what programs/users are allowed to execute certain scripts. Yet as mentioned before I consulted the Windows sysadmin at our company and he couldn't figure it out. So the questions I have are:
1.) Are there special steps that must be taken in a Windows 2008 R2 environment to allow Dell OME to execute scripts? (changing security settings, etc.)
2.) Has anyone else had this issue ?? (I can't help but think someone else has encountered it?)
Thank you for all your support,
Dan
DELL-Martijn G
291 Posts
0
August 12th, 2015 09:00
Hi Dan,
So you have the batch file somewhere on the OME server, how do you call this in the "Alert Application Launch"?
I've created a test script in my environment and it works as expected. I created a batch file that logs the message to a log file and is located on the OME server on the path C:\OME.
Script
@echo off
set DEVICE=%1
set MESSAGE=%2
echo It works on %DEVICE% with message: %MESSAGE% >> "C:\OME\log.txt"
Then I created a "Alert Application Launch" task with the following settings.
After that select the settings as needed.
With this setup I get a log file in the location specified that gives me this:
It works on "" with message: "LinkUp Port or number: 27"
It works on "" with message: "SNMP Agent cold start message."
It works on "" with message: "LinkUp Port or number: 1"
It works on "" with message: "LinkUp Port or number: 7"
It works on "" with message: "LinkUp Port or number: 8"
It works on "" with message: "LinkUp Port or number: 9"
It works on "" with message: "LinkUp Port or number: 13"
It works on "" with message: "LinkUp Port or number: 16"
It works on "" with message: "LinkUp Port or number: 17"
It works on "" with message: "LinkUp Port or number: 18"
It works on "" with message: "LinkUp Port or number: 20"
It works on "" with message: "LinkUp Port or number: 23"
It works on "" with message: "LinkUp Port or number: 24"
It works on "" with message: "LinkUp Port or number: 25"
It works on "" with message: "LinkUp Port or number: 26"
It works on "" with message: "LinkUp Port or number: 27"
You should even be able to directly call the "send_nsca.exe" from the task with the correct arguments.
Dan_Chicago
9 Posts
0
August 12th, 2015 12:00
Hi Martijn,
Thank you for the feedback. Here is a screencap of my alert application settings:
Your post gave me a new idea. I placed my executable within the same directory as OME, hoping to negate any user/group permissions that are blocking OME from running the script. I also investigated user/group permissions on a sample script supplied by OME within this dir called esx4_snmp_setup.py and applied same user/group permissions to my script. Unfortunately this has not worked, and I have tried with file types .exe, .bat and .vmd.
question - are you running OME services under the local System account? Or have you changed to a local Administrator account (which I have done as part of my troubleshooting)? I changed services to run under System again, and changed owner on file back to System, still no luck. It shouldn't matter so long as the OME User matches the user permissions on the script but I'm just trying to compare apples to apples.
btw - I'm saying the script fails based on not seeing the expected behavior when I execute "Test Action" (as seen in your screencap in the previous posting). Is that button working for you?
I noticed you are scripting with .cmd. I might rework my script into this format. Alternately, OME's sample script esx4_snmp_setup.py is a python script so I might try that as well. I don't know, something is blocking me. I suspect a Windows security setting somewhere for allowing applications to execute a script, just don't know where. I'm surprised if nobody else has seen this before. I did find some other forum postings online relating to this issue but no resolution was ever posted (if I determine the source of the problem I'll be sure to post here).
Thanks,
Dan
Dan_Chicago
9 Posts
0
August 12th, 2015 12:00
screencap didn't post, "preview" button would be useful, apologies:
Dan_Chicago
9 Posts
0
August 12th, 2015 14:00
screencap not posting, I see you embedded a URL on your screencap, me I'll just provide the details here:
Alert Application Launch Summary
Name : Nagios NSCA
Action Enabled: Enabled
Description: forward alert over NSCA port
Executable Name: "C:\Program Files\Dell\SysMgt\Essentials\call_nsca_from_ome.bat"
Arguments: >NUL // this autopopulates if no arguments provided
DELL-Martijn G
291 Posts
0
August 13th, 2015 02:00
Hi Dan,
Is there a reason you are not passing any arguments or is that just to test? In this setup you will never get any info into your script to know who or what is going on.
My OME services are still running as default installed under the Local System.

The message that you get: "A device or program has requested your attention." Is the Windows Interactive Services Detection. Since Windows Server 2008, Microsoft does not allow programs that run as a service to start a window in the GUI for the user those are suppressed with the warning you see. This is completely normal because the OME service starts a CMD window to execute the batch file. The message is only means that the CMD window was started but was not displayed, the batch file it self would still run.
In my setup you can see that the DSM_OMSE_Netmon_6.exe creates the instances under the Local System account. If I would change my services to run for instance under my Admin account I would see the same message.

Please use the script I created with the task setup to verify that scripts are running.
On a side note, maybe this can also help you. Dell OpenManage Plug-in for Nagios Core
Dan_Chicago
9 Posts
0
August 13th, 2015 13:00
Hi Martijn,
Just writing back with an update. I copied your script into our environment and executed through OpenManage Alert Application Launch, yes this worked for me. However when I attempt to execute the following script it does not work:
@echo off
set DEVICE=%1
set NAGIOS=
ECHO %DEVICE%;Memory;1;Test | C:\send_nsca.exe -H %NAGIOS% -d ";"
Note: yes I hardcoded values into my previous script for testing purposes, but as you can see I have amended to allow for individual devices to self-report through the script.
This script is attempting to pipe the health data gathered by OME into the send_nsca.exe plugin. This nsca plugin would then handle the exchange of submitting that data to the nagios external command file and process the alert. I am interested to know if anyone has had success in Alert Application Launch in such a way - calling one script which pipes data into another script which OME is not directly calling. As indicated in my previous posts this exact command does execute successfully on the command line, but fails when launched by OME. I'm going to try reworking this so perhaps I can have OME call the send_nsca.exe plugin directly.
Yes I did see that OpenManage Plugin, unfortunately that seems only for PowerEdge servers (at least according to the documentation?). We have some EqualLogic devices located on a customer site and we need to gain visibility into hardware failures. I haven't found any Nagios plugins geared towards handling hardware failures for Dell NAS/Equallogic devices, so my thought was to setup the OME server to pipe health monitoring results into our Nagios instance where they would be emailed out. We strongly prefer getting these alerts into Nagios, rather than emailing directly from the OME server, since we desire just 1 central location where we are generating alerts.
Thanks,
Dan
DELL-Martijn G
291 Posts
0
August 17th, 2015 02:00
Hi Dan,
Please update your script to the following to test if it is called correctly.
@echo off
set DEVICE=%1
set NAGIOS=
ECHO %DEVICE%;Memory;1;Test | C:\send_nsca.exe -H %NAGIOS% -d ";" >> send_nsca.txt
That way it should create a send_nsca.txt in the root drive with the output of C:\send_nsca.exe command to check if there are any errors.
When I run mine directly from the command line I get:
Connection refused or timed out
Error: Could not connect to host 1651 on port 5667
That is because I don't have Nagios in my Demo environment.
When I run it through the Alert Action I get:
Could not open config file 'send_nsca.cfg' for reading.
Error: Config file 'send_nsca.cfg' contained errors...
That is because I don't specify the config file in my script and the running path in the script is Windows system32.

You should probably also give the path to send_nsca.cfg in the script.
@echo off
set DEVICE=%1
set NAGIOS=
ECHO %DEVICE%;Memory;1;Test | C:\send_nsca.exe -H %NAGIOS% -d ";" -c " \send_nsca.cfg"
Dan_Chicago
9 Posts
0
August 17th, 2015 09:00
OK, this is now working. Thank you Martijn for walking through this with me. Explanation:
1.) I followed your advice and created the script exactly as you described above to pipe its output to the log file send_nsca.txt. When running the script manually from the command line I see the following output in send_nsca.txt:
1 data packet(s) sent to host successfully.
I also see the following expected results on my nagios server:
a) tail -f /var/log/messages: PASSIVE SERVICE CHECK: ;Memory;1;Test
b) alert generated on nagios web interface for service check 'Memory' on the respective host
2.) when I attempted to execute the script using OME I did not see evidence of the script being called in send_nsca.txt, nor did I see the results on the nagios server. I then changed the script from a .cmd file to a .bat file. THIS WORKED (?). I see the expected results on the Nagios server, but I did not initially see the output piped into send_nsca.txt. Interestingly I had to put the full path to the send_nsca.txt file into the .bat file, however the .cmd file found the send_nsca.txt without the full path.
For those following this thread that are hoping for a similar implementation, here is the final version of my script, importantly saved as a .bat file:
@ECHO OFF
SET nagios=
SET device=%1
SET message=%2
ECHO %device%;OME;1;%message% | C:\send_nsca.exe -H %nagios% -d ";" -c "C:\send_nsca.cfg"
Other parameters:
- all scripts saved in C:\, including call_nsca_from_ome.bat (displayed above) and the plugins send_nsca.exe and send_nsca.cfg (you can download these from the Nagios exchange). The log file send_nsca.txt is also saved on C:\. I don't think you necessarily need to keep everything on C:\ but just indicating they're in the same directory.
- OME services DSM* are running under local SYSTEM account. All files listed above provide at least group permission to this account, although in my testing I did not find the actual owner of the file to be an issue.
Thanks again Martijn,
Dan
DELL-Martijn G
291 Posts
0
August 17th, 2015 11:00
Hi Dan,
Good to hear it is working.
Make sure you remove the >> C:\send_nsca.txt from the script because it was only used to redirect the console output to a file to test.
Would you mark the post with the answer as such?
Dan_Chicago
9 Posts
0
August 17th, 2015 12:00
amended my previous post, thanks
Dan
DELL-Martijn G
291 Posts
0
August 18th, 2015 03:00
Hi Dan,
Would you mark the post with the solution as the answer by clicking Yes?
Dan_Chicago
9 Posts
0
August 18th, 2015 08:00
Yes I want to click that button, once I find it. I just sat through a 3 minute tutorial on Dell techcenter and still, no idea where that button should be located. If you let me know I would be more than happy to click it.
Thanks,
Dan