Service Desk Practitioners Forum
cancel

Command Exec Action

SOLVED
Go to solution
Highlighted
Zorin
Super Contributor.

Command Exec Action

I have DB Rule with command Exec Action (see attach). And after triggering DB Rule I have next string in logserver.txt:

Wed, 26/07/2006 14:41:55 Rule "sd_event" was valid, execute the actions

Wed, 26/07/2006 14:41:56 Rule: sd_eventsd_event (Command Exec Action) Agent: localhost: not responding (machine switched off?).
46 REPLIES
Zorin
Super Contributor.

Re: Command Exec Action

And my question: why my localhost not responding?

With regards,
Zorin
Raghunathan Tik
Outstanding Contributor.
Solution

Re: Command Exec Action

Hi Zorin,

You need to have SD Agent running on the system where you are executing the command line.

Make sure that you start the SD Agent and then check.

raman
Zorin
Super Contributor.

Re: Command Exec Action

thank you Raman
Zorin
Super Contributor.

Re: Command Exec Action

Now I installed agent software
and in after triggering DB Rule witn command Exec Action I have next string in logserver.txt:

Thu, 27/07/2006 09:24:44 Rule "sd_event" was valid, execute the actions

BUT, sd_event.exe not starting. Programm sd_event located in C:\sd_event folder.
And when I start it in manual regim from command line it works!

Why my command Exec Action not starting sd_event.exe?
Raghunathan Tik
Outstanding Contributor.

Re: Command Exec Action

Hi Zorin,

Can you attache the snapshot of the action that you are using in teh DB rule?

Raman
Zorin
Super Contributor.

Re: Command Exec Action

Command Exec Action form you can view in attach.

regards,
Zorin
Raghunathan Tik
Outstanding Contributor.

Re: Command Exec Action

Hi Zorin,

the only thing that I noticed (but not very sure as to whether this is going to help you). There is a space in the last variable (event_id= [ID]). try removing the white space after equals sign in the last variable..

hope this helps you

raman
Zorin
Super Contributor.

Re: Command Exec Action

I deleted space before [ID] and now expression of whole for DB Rule:

When service call is modified
where Status (*) equals To another server of Service desk
sd_event (Command Exec Action) , , Host: localhost, Command line: C:\sd_event\sd_event.exe, Parameters: -f C:\sd_event\sd_event.ini -v description=[Description] impact=[Impact] priority=[Priority] event_id=[ID]

May be in another part of this expression error was?
Zorin
Super Contributor.

Re: Command Exec Action

Strange for me: in folder "C:\sd_event" I don't have writes in sd_event.log like this:
-----------------------
[EVENT_7668]
VALUE_LIST="username=system#password=servicedesk#mapping=external_event#className=incident#modus=INSERT#description=[Description]#impact=[Impact]#priority=[Priority]#event_id=771#"
SERVER=192.168.65.84
PORT=30980
SERVER_RESPONSE= OK
LANGUAGE=GB
TRY=1
LOGFILE=sd_event.log
ERROR_LOGFILE=sd_event_error.log
TIMESTAMP= 7/27/2006 15:39:18
ONFAIL=
---------------------
This record I receive when started sd_event in manualy.

regards,
Rodion Zvorygin
Raghunathan Tik
Outstanding Contributor.

Re: Command Exec Action

Hi Zorin,

its being strange to me tooo... unable to think of any possibilities... hope someone looking on this chain would help both of us :)

raman
Zorin
Super Contributor.

Re: Command Exec Action

I think this situation coming because in command Exec Action we not pointing working folder (and sd_event.exe not known where is sd_event.ini) file. What you think about this supposition?
Raghunathan Tik
Outstanding Contributor.

Re: Command Exec Action

Hi Zorin,

If thats the case, why not try copying the ini file too into the same directory where you are executing the sd_event.exe

raman
Zorin
Super Contributor.

Re: Command Exec Action

yes, Raman, this file in this folder:

Dir listing:
01/05/2006 11:57a 77,824 sd_event.exe
07/28/2006 12:46p 206 sd_event.ini
07/28/2006 02:17p 379 sd_event.log

Sd_event.eve found this file without assistance?
Raghunathan Tik
Outstanding Contributor.

Re: Command Exec Action

Hi Zorin,

Now I suspect something to do with the path that you were referring to. Can you modify the Enviroment Vairables to point to the directory where you are executing the sd_event

raman
Zorin
Super Contributor.

Re: Command Exec Action

Hi Raman!

sd_event.exe has path in Command Exec Action. (see attach)
What your mean?

regards, Zorin
Raghunathan Tik
Outstanding Contributor.

Re: Command Exec Action

1) Right click on My Computer
2) Properties
3) go to Advanced Tab
4) Click on Environment Variables
5) scrol down where the path is set under "System Variables"
6) Double click the path and then add "c:\sd_event" to the end (make sure you are adding ; before adding this path into the existing value
7) remove the command line "c:\sd_event\sd_event.exe" in the DB Rule and just specify sd_event.exe

and lets pray that this time it works :-)

raman
Zorin
Super Contributor.

Re: Command Exec Action

Thank you very match, Raman!

After adding the path in Environment Variable it's work! And sd_event now is running.

But error in log I have error=2. What this error is mean?

Fri, 28/07/2006 15:12:17 Rule: sd_eventsd_event (Command Exec Action) Agent: localhost Commandline: sd_event.exe -f sd_event.ini -v description=testing 1908- impact= priority=Medium external_id=177 Error: CreateProcess: sd_event.exe -f sd_event.ini -v description=testing 1908- impact= priority=Medium external_id=177 error=2

regards,
Zorin
Raghunathan Tik
Outstanding Contributor.

Re: Command Exec Action

Hi Zorin,

its great to hear that we passed on to next stage of yet another issue ;) never mind.

here is what i could find from the data exchange guide (page 268).

you may go through the below mentioned sample format and try to modify your parameters

----------------------------

user=sdmom password=sdmom "guid=\"[Source ID]\""
"id=\"[ID]\"" "Status=\"[Status]\"" "Service=\"[Service]\""
"Description=\"[Description]\""
"Information=\"[Information]\"" "Solution=\"[Solution]\""
"Workaround=\"[Workaround]\"" "Impact=\"[Impact]\""
"Severity=\"[Severity]\""
"Assignedto=\"[Assignment;To person;Full name;First
name] [Assignment;To person;Full name;Last name]\""

-------------------------------

all the best. hope this too resolves your issue

Raman
Zorin
Super Contributor.

Re: Command Exec Action

Hi Raman!

When I manually started sd_event - all is OK. And service call is added.
In "data exchange" manual in page 268-270 parameters for sd2mom.exe.
But I have sd_event.exe.

I use parameters from examples in page 160:

C:\project\revelation\bin\sd_event.exe -f sd_event.ini -v
description="test 1234" status=s1 event_id=654321
information="my info" impact=2 priority=Low ci=SERVICEDESK

And when I try
description="\"[Description]\"".
in another service desk server created service call with value "la-la-la" (in my case this value equal la-la-la without quotes.

regards,
Zorin
Raghunathan Tik
Outstanding Contributor.

Re: Command Exec Action

hi Zorin,

instead of using

description="\"[Description]\""

try

"description="\[Description]\""

Raman
Raghunathan Tik
Outstanding Contributor.

Re: Command Exec Action

Hi Zorin,

sorry sorry for the previous message,
i never read it completely.

leme have a look at it once again

raman
Raghunathan Tik
Outstanding Contributor.

Re: Command Exec Action

Zorin,

try with single quotes like this


description=\"[Description]\"

raman
Raghunathan Tik
Outstanding Contributor.

Re: Command Exec Action

Zorin,

try with single double quote like this


description=\"[Description]\"

raman
Zorin
Super Contributor.

Re: Command Exec Action

After felling new parameters (see attach) I have nex string in logserver.txt:


Fri, 28/07/2006 16:14:47 Rule: sd_eventsd_event (Command Exec Action) Agent: localhost Commandline: sd_event.exe -f sd_event.ini -v "description=\"testing 1908-\"" Error: CreateProcess: sd_event.exe -f sd_event.ini -v "description="testing 1908-"" error=2

What is mean error=2?