- Community Home
- >
- Servers and Operating Systems
- >
- HPE ProLiant
- >
- Server Management - Systems Insight Manager
- >
- Re: Custom Commands
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2004 08:01 AM
тАО02-26-2004 08:01 AM
Custom Commands
I am trying to setup a custom command that will kickoff a VBscript. I want the script to recieve the %DEVICENAME% environment variable as a command line argument. An email is then sent displaying the variable.
Here is what I have.
test.bat
c:\testvar.vbs %DEVICENAME%
test2.bat
c:\testvar.vbs %1%
testvar.vbs
Var1 = WScript.Arguments.Item(0)
Set objEmail = CreateObject("CDO.Message")
objEmail.From = "mark.kempe@mycompany.com"
objEmail.To = "mark.kempe@mycompany.com"
objEmail.Subject = "Test email"
objEmail.Textbody = "Variable 1 is " & Var1
objEmail.Send
both batch files work fine from the command prompt using regular environment variables. However, if I run either as a custom command, it stays in a pending state with status "Running 0%" and no email is received. Also I have tried to run the script alone as a custom command with the same pending state.
What am I doing wrong?
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2004 01:16 AM
тАО02-27-2004 01:16 AM
Re: Custom Commands
cscript.exe "C:\Program Files\HP\testvar.vbs" //nologo
Then remove the use of the variable. Make sure it can send you an e-mail all by itself. If the e-mail fails try something more generic like write a text file. It is possible your SIM run as account doesn't have permission to send e-mail.
Finally to bring the variable back in you can do that within vbscript. It would go something like this:
Set WshShell = WScript.CreateObject("WScript.Shell")
Var1 = WshShell.ExpandEnvironmentStrings("%DEVICENAME%")
I hope this helps,
Tim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2004 03:22 AM
тАО02-27-2004 03:22 AM
Re: Custom Commands
I will try it out today.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2004 03:53 AM
тАО02-27-2004 03:53 AM
Re: Custom Commands
I did another test using notepad.exe. I saw the process start on the Insight Server. looked at the Task results and it showed "Pending" and "Running 0%". I killed the process and the task results still showed "Pending" and "Running 0%".
At this point, I am pretty sure there isn't a problem with the script. It looks like I am having a problem running custom commands.
Any ideas?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2004 04:20 AM
тАО02-27-2004 04:20 AM
Re: Custom Commands
any chance you were part of the beta program and are running that code rather than the release code? There was a problem in the beta that resulted in the "Running 0%" like you say and it was corrected upon release.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2004 04:35 AM
тАО02-27-2004 04:35 AM
Re: Custom Commands
I am pretty sure it is the production release. I didn't install it. We are running Build C.04.00.00 and Build date of 2003-12-12 17:32.
I have not checked if there are any SP's or patches for this release yet.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2004 07:48 AM
тАО02-27-2004 07:48 AM
Re: Custom Commands
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2004 03:41 AM
тАО03-02-2004 03:41 AM
Re: Custom Commands
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2004 09:14 PM
тАО03-02-2004 09:14 PM
Re: Custom Commands
In my case it has to do with SSH Host Keys because when ever I try a Custom Command I get two error messages in the Eventlog on the CMS:
Did not receive identification string from 192.168.60.143.
and
Received disconnect from 192.168.60.143: 9: The host key supplied was not valid.
The IP-address in the messages is the CMS's address, on which the command is to be executed on.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2004 04:01 AM
тАО03-04-2004 04:01 AM
Re: Custom Commands
cc.bat - located in the root of c:\
its content is:
echo test > test.txt
of course no problems when I run it from the command line.
I setup a custom command to run c:\cc.bat. No parameters or switches.
When it runs, I get "Running 0%" and a state of "Pending" also, the task can not be killed. The only way of getting rid of it is by rebooting the server.
I would really appreciate some advise from one of the experts. Please direct me where to look to troubleshoot this issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2004 08:48 AM
тАО03-04-2004 08:48 AM
Re: Custom Commands
With the Custom Commands they do login using SSH, so you may want to check things there.
By any chance is the account you installed HPSIM under different from the one you're now logging in to HPSIM?
If so, try deleting the Custom Command and recreating it under the Account HPSIM was installed under.
You might also want to check the passwd file on your CMS Server. c:\Program Files\OpenSSH\etc and verify that there are at least two entries in there, one for Administrator and one for the Account IM was installed in, probably your Domain Admin Account. If there is no entry for Administrator try adding it via the mxagentconfig utility.
I had fun and games with Custom Commands when I created them using my account. Especially where the Event Notification task had the Run Under as my account, once I changed them back to the Domain Admin Account it all worked okay.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-05-2004 05:24 AM
тАО03-05-2004 05:24 AM
Re: Custom Commands
The description for Event ID ( 0 ) in Source ( sshd ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. The following information is part of the event: sshd : PID 8756 : Received disconnect from 199.199.199.99: 9: The host key supplied was not valid.
I have tried running the command logged in as myself and the account used to do the install. Both accounts are domain admins. Neither work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-05-2004 06:58 AM
тАО03-05-2004 06:58 AM
Re: Custom Commands
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-05-2004 08:30 PM
тАО03-05-2004 08:30 PM
Re: Custom Commands
I still get the message "The host key supplied was not valid." and I believe that it comes from the initial commands that is run when starting SIM but I haven't been able to find where the default username used when login via SSH is stated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-08-2004 04:40 AM
тАО03-08-2004 04:40 AM
Re: Custom Commands
What process is failing that generates the eventlog message?
What Host Key file is being checked?
Can this Host Key be refreshed or replaced?
It is becoming critical that I get this process working. If we can not get it working, my company will have no other choice but to resort to using other third party tools to monitor our HP equipment such as Patrol or Unicenter. I would prefer to stay with HPSIM but, I, like the rest of you, have a job to do and I am spending way to much time on this issue.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-08-2004 06:23 AM
тАО03-08-2004 06:23 AM
Re: Custom Commands
I can confirm that what you're trying to do will work. That's probably not what you wanted to hear as it points to something awry with your setup.
Here's what I did.
Set up test.bat using the command you gave.
I saved this to d:\perl_scripts\test.bat on the CMS Server.
First I tried setting up the Custom Command while logged in under my account, when running this it failed with the MXAuthentication Error which I cannot get around.
Note: I only select the CMS Server to run the command against, during the Scheduling part.
I then deleted the Custom Command.
I then logged into the account SIM was installed under, recreated the Custom Command as above and reran. This time it worked fine.
Have you tried logging in to the Server using the SSH Utility (or Putty) if you have it to test OpenSSH is working?
Maybe try moving the test command away from the root to a specified directory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-08-2004 07:56 AM
тАО03-08-2004 07:56 AM
Re: Custom Commands
From the CMS, logged in as the domain admin account used to install HPSIM and the reinstallation of OpenSSH, I am able to open a command prompt and run ssh. I supply the username and password for the installation account. It connects successfully(to itself) and I am able to run the batch job from the command prompt. I then Exit the ssh. I opened HPSIM while still logged in and created a new custom command. when I ran the command(against itself) I get the same results "running 0%" status "pending" and an entry in the eveltlog showing "invalid host key" and the task can not be killed. Back to the same old spot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-08-2004 08:06 AM
тАО03-08-2004 08:06 AM
Re: Custom Commands
I had to create the custom command under the account I installed HPSIM in, not the account in HPSIM I created for myself.
Just to check, did you limit the number of devices the batch file was to run against?
Also, check that the Administrator User is is the passwd file. When I reinstalled OpenSSH this got removed and I had to add it via the mkpasswd command and update the keys via the mxagentconfig utility.
You might want to try regenerating the OpenSSH Keys for the Domain Account IM was installed in, I cannot recall the exact procedure but it involved renaming some files in the .ssh directory of the home directory and rerunning the mxagentconfig utility for each account.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-08-2004 08:17 AM
тАО03-08-2004 08:17 AM
Re: Custom Commands
I am logged into both the server and HPSIM as the account used to install HPSIM. The account "Administrator" is not in the passwd file. I am reading about the Key generator now. It isn't too clear on what key it is looking for.
Does it want the key from
Insight Manager:
D:\program files\Systems Insight Manager\config\sshtools\.dtfSshKey
SSH client:
D:\program files\OpenSSH\etc
or
the user home dir \.ssh\
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-08-2004 08:29 AM
тАО03-08-2004 08:29 AM
Re: Custom Commands
Use the mxpasswd to generate a Local Administrator Account in the passwd file.
Then from a command prompt on the SIM Server, run mxagentconfig and enter the Local Administrator Account and Password.
This should generate the .ssh directory and key files in this under the home directory, by default that should be c:\documents and settings\administrator.
If, like me, you've reinstalled OpenSSH, this account doesn't get regenerated in the SSH Structure and does seem to be required.
It fixed a couple of demons for me.