Discussion:
Event commands in Core 4 problems
Court Harris
2012-10-09 15:57:02 UTC
Permalink
Court Harris [http://community.zenoss.org/people/courtneyjh] created the discussion

"Event commands in Core 4 problems"

To view the discussion, visit: http://community.zenoss.org/message/68919#68919

--------------------------------------------------------------
I am having a problem getting event commands to work in Core 4. I have successfully created a trigger and linked it to an email notification which works flawlessly. Now I am trying to take that same trigger and apply it to an event command using iSQL to update a monitor log database we use. The command text works fine from the command line terminal, but when placed inside the Zenoss event command and linked to the trigger I only get an error email sent saying it is unable to execute:

System Failure - Error executing action Command.

The command text includes the following:

isql -v data sa 1234
use DMBugLog
insert into servererrors VALUES ('2010-10-7', '1234', 'testing', '1')


I am sure I am missing something regarding using an elevated user at the command line or something of that matter, but I am unable to find any documentation outside of the basic Core 4 admin documentation which isn't very thorough on this subject. Has anyone ever accomplished something like this in Core 4? The command above is just a sample. I need to be able to use iSQL to update our servererrors table with the device and datestamp of the event when it occurs.

Any advice is greatly appreciated as I am pretty stuck on this now.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/68919#68919]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Shane Scott
2012-10-09 16:06:15 UTC
Permalink
Shane Scott [http://community.zenoss.org/people/hackman238] created the discussion

"Re: Event commands in Core 4 problems"

To view the discussion, visit: http://community.zenoss.org/message/68943#68943

--------------------------------------------------------------
Court:

Does this command execute successfully as the zenoss user? Have you tried supplying the full path?

Best,
--Shane Scott (Hackman238)
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/68943#68943]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Court Harris
2012-10-09 16:22:06 UTC
Permalink
Court Harris [http://community.zenoss.org/people/courtneyjh] created the discussion

"Re: Event commands in Core 4 problems"

To view the discussion, visit: http://community.zenoss.org/message/68920#68920

--------------------------------------------------------------
Shane,

Thanks for the reply. Right now I am just inserting sample events. Since I want the command to run against the Zenoss command line for an event on a server that is most likely in a different class like a Windows Server how would this be accomplished? I can set the zcommanduser and pass settings for the /Server/cmd device class, but I don't think that would execute against the Zenoss server when a trap from another server is triggered.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/68920#68920]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Court Harris
2012-10-09 16:53:46 UTC
Permalink
Court Harris [http://community.zenoss.org/people/courtneyjh] created the discussion

"Re: Event commands in Core 4 problems"

To view the discussion, visit: http://community.zenoss.org/message/68951#68951

--------------------------------------------------------------
Shane,

I logged into the command line with the user defined in the global zcommandusername and navigated to /$ZENHOME/libexec/ and pasted the sample command text. It connected to the MSSQL server and inserted the row without any problems. I then tried to create a new event and have it duplicate the same. I get the email notification, but the command does not execute as it does when i connected as user "zenoss" and pasted the command into the /$ZENHOME/libexec/ path.

Is there something else that could be missing?    
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/68951#68951]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Shane Scott
2012-10-09 16:58:19 UTC
Permalink
Shane Scott [http://community.zenoss.org/people/hackman238] created the discussion

"Re: Event commands in Core 4 problems"

To view the discussion, visit: http://community.zenoss.org/message/68947#68947

--------------------------------------------------------------
Court:

The zCommandUser is for zencommand and zenmodeler, not eventCommands. Event commands will run as the zenoss user.

--Shane Scott (Hackman238)
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/68947#68947]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Court Harris
2012-10-09 17:02:07 UTC
Permalink
Court Harris [http://community.zenoss.org/people/courtneyjh] created the discussion

"Re: Event commands in Core 4 problems"

To view the discussion, visit: http://community.zenoss.org/message/68952#68952

--------------------------------------------------------------
Shane,

Ok, I have logged into the SSH term as the zenoss user and executed my command without any problems. It inserts a new row in my SQL table with the test data records and no errors. What else can I test or check to see if I have this configured right since it is working from a terminal?    
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/68952#68952]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Shane Scott
2012-10-09 17:04:40 UTC
Permalink
Shane Scott [http://community.zenoss.org/people/hackman238] created the discussion

"Re: Event commands in Core 4 problems"

To view the discussion, visit: http://community.zenoss.org/message/68948#68948

--------------------------------------------------------------
Court:

The problem is the command is being run on the local zenoss box. You'll need to wrap that in an ssh command to the target.

--Shane
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/68948#68948]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Court Harris
2012-10-09 17:20:43 UTC
Permalink
Court Harris [http://community.zenoss.org/people/courtneyjh] created the discussion

"Re: Event commands in Core 4 problems"

To view the discussion, visit: http://community.zenoss.org/message/68954#68954

--------------------------------------------------------------
Shane,

The intention is to run it on the local Zenoss box. I have iSQL working on the Zenoss box and iSQL is connecting to the data source and inserting a row when the trigger hits. The data source is going to keep track of errors so that we can act on this data source table for some other projects.

The flow needed is like this:

Zenoss -> Event Command -> iSQL Connect to Datasource -> Insert new row of event details.

This is working without any problems from the command line on the Zenoss box.

Any other ideas?
By the way I appreciate you taking the time to help.    
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/68954#68954]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Shane Scott
2012-10-09 17:27:10 UTC
Permalink
Shane Scott [http://community.zenoss.org/people/hackman238] created the discussion

"Re: Event commands in Core 4 problems"

To view the discussion, visit: http://community.zenoss.org/message/68949#68949

--------------------------------------------------------------
Court:

Ah okay, I misunderstood. From the CLI, su zenoss then zenactiond debug. Trigger the eventCommand again. Let's see if the zenactiond.log reveals anything more useful about the failure.

Best,
--Shane
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/68949#68949]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Court Harris
2012-10-09 18:02:43 UTC
Permalink
Court Harris [http://community.zenoss.org/people/courtneyjh] created the discussion

"Re: Event commands in Core 4 problems"

To view the discussion, visit: http://community.zenoss.org/message/68955#68955

--------------------------------------------------------------
I attached the log.  I just issued an event against logic1.solutioncenter.biz so that is the device that would be impacted. It looks like the log is saying "SUCCESS" for the command, however?
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/68955#68955]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Shane Scott
2012-10-09 18:09:37 UTC
Permalink
Shane Scott [http://community.zenoss.org/people/hackman238] created the discussion

"Re: Event commands in Core 4 problems"

To view the discussion, visit: http://community.zenoss.org/message/68950#68950

--------------------------------------------------------------
Court:

Does your sql db reflect the command success?

--Shane
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/68950#68950]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Court Harris
2012-10-09 18:16:46 UTC
Permalink
Court Harris [http://community.zenoss.org/people/courtneyjh] created the discussion

"Re: Event commands in Core 4 problems"

To view the discussion, visit: http://community.zenoss.org/message/68956#68956

--------------------------------------------------------------
It does not. The table only has the four rows that I have successfully INSERTED via the command line when testing the iSQL command interactively.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/68956#68956]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Shane Scott
2012-10-09 18:37:41 UTC
Permalink
Shane Scott [http://community.zenoss.org/people/hackman238] created the discussion

"Re: Event commands in Core 4 problems"

To view the discussion, visit: http://community.zenoss.org/message/68966#68966

--------------------------------------------------------------
Court:

Hum, that's odd. Can you try putting your sql call in to a bash script that returns an exit code and call that script from the eventCommand?

--Shane
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/68966#68966]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Court Harris
2012-10-09 20:52:46 UTC
Permalink
Court Harris [http://community.zenoss.org/people/courtneyjh] created the discussion

"Re: Event commands in Core 4 problems"

To view the discussion, visit: http://community.zenoss.org/message/68960#68960

--------------------------------------------------------------
Shane,

I placed the isql command into a script in /opt/zenoss/libexec called isqlscript.sh -- I tested the command bash isqlscript.sh from the command line and it is working fine. I modified the eventCommand to simply run: bash isqlscript.sh but it is not inserting anything when called from the triggered event.

I created a logic3 event and this is what the error log contains now, but no new rows are inserted:
2012-10-09 14:44:24,381 INFO zen.zenactiond: Event:'logic3||/Unknown|5|226pm' Trigger:CriticalDeviceTrigger Action:command Status:SUCCESS Target:admin,zenoss
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/68960#68960]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Shane Scott
2012-10-10 14:26:21 UTC
Permalink
Shane Scott [http://community.zenoss.org/people/hackman238] created the discussion

"Re: Event commands in Core 4 problems"

To view the discussion, visit: http://community.zenoss.org/message/68980#68980

--------------------------------------------------------------
Court:

Okay that's just odd. Can you add a line that touches a file and try again? I'm wondring if it's executing or not.

Best,
--Shane Scott (Hackman238)
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/68980#68980]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Court Harris
2012-10-10 14:35:29 UTC
Permalink
Court Harris [http://community.zenoss.org/people/courtneyjh] created the discussion

"Re: Event commands in Core 4 problems"

To view the discussion, visit: http://community.zenoss.org/message/68963#68963

--------------------------------------------------------------
Any suggestion on what I could add to the script that would help diagnose? I'm just looking to get it right the first time for debugging purposes.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/68963#68963]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Shane Scott
2012-10-10 14:36:51 UTC
Permalink
Shane Scott [http://community.zenoss.org/people/hackman238] created the discussion

"Re: Event commands in Core 4 problems"

To view the discussion, visit: http://community.zenoss.org/message/68983#68983

--------------------------------------------------------------
Court:

Can you modify the script to touch a file in the zenoss directory and check for the existance after triggering the eventCommand?

Best,
--Shane Scott (Hackman238)
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/68983#68983]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Court Harris
2012-10-10 17:08:28 UTC
Permalink
Court Harris [http://community.zenoss.org/people/courtneyjh] created the discussion

"Re: Event commands in Core 4 problems"

To view the discussion, visit: http://community.zenoss.org/message/68965#68965

--------------------------------------------------------------
Ok I have the script structured like this. Is this what you had in mind? I have triggered it and the log entry is below.


#!/bin/bash
if [ ! -f /opt/zenoss/README.txt ]; then
    echo "File not found!"

fi
echo "done checking file exists"


isql -v data quick 1234 << EOF
insert into servererrors VALUES ('2010-10-7', '1234', 'testing', '1')
go




2012-10-10 11:01:49,118 INFO zen.zenactiond: Event:'logic4||/Unknown|5|1105am' Trigger:CriticalDeviceTrigger Action:command Status:SUCCESS Target:admin,zenoss Info:<NotificationSubscription Info "Command">
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/68965#68965]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Court Harris
2012-10-10 17:36:14 UTC
Permalink
Court Harris [http://community.zenoss.org/people/courtneyjh] created the discussion

"Re: Event commands in Core 4 problems"

To view the discussion, visit: http://community.zenoss.org/message/68997#68997

--------------------------------------------------------------
Shane,

One thing I just tried was deleting the isqlscript.sh out of the /opt/zenoss/libexec and then triggering the event command. It is still showing a success output in the action log. How is it possible that it would still be showing a success when the script has been deleted? It looks to be some mismatch here.

2012-10-10 11:28:20,183 INFO zen.zenactiond: Event:'logic5||/Unknown|5|1132am' Trigger:CriticalDeviceTrigger Action:email Status:SUCCESS Target:Info:<NotificationSubscription Info "EmailAlert"> 2012-10-10 11:28:20,451 INFO zen.zenactiond: Event:'logic5||/Unknown|5|1132am' Trigger:CriticalDeviceTrigger Action:command Status:SUCCESS
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/68997#68997]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Shane Scott
2012-10-10 23:48:11 UTC
Permalink
Shane Scott [http://community.zenoss.org/people/hackman238] created the discussion

"Re: Event commands in Core 4 problems"

To view the discussion, visit: http://community.zenoss.org/message/68999#68999

--------------------------------------------------------------
Court:

The line above is success on an email notification, not the event command. What I meant by have the script touch a file was to have the script execute touch on a uniqure filename, like the date, in a directory zenoss has wite access to. After triggering the eventcommand check to see if the script touched the expected files.

--Shane
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/68999#68999]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Court Harris
2012-10-11 15:08:25 UTC
Permalink
Court Harris [http://community.zenoss.org/people/courtneyjh] created the discussion

"Re: Event commands in Core 4 problems"

To view the discussion, visit: http://community.zenoss.org/message/69027#69027

--------------------------------------------------------------
Ok I have modified the script to just touch readme1.txt. It works from the command line and alters the date modified timestamp, but when triggered from the eventcommand it does not hit the file. The script is located in /opt/zenoss/libexec. What other debugging or options should I check now that we know it is not hitting the touch command in the script, i.e. not executing at all truly?
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69027#69027]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Shane Scott
2012-10-11 15:10:07 UTC
Permalink
Shane Scott [http://community.zenoss.org/people/hackman238] created the discussion

"Re: Event commands in Core 4 problems"

To view the discussion, visit: http://community.zenoss.org/message/69023#69023

--------------------------------------------------------------
Court:

Seems like it's not executing it at all. Can you post a screenshot of the eventCommand notification?

Best,
--Shane Scott (Hackman238)
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69023#69023]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Court Harris
2012-10-11 15:34:41 UTC
Permalink
Court Harris [http://community.zenoss.org/people/courtneyjh] created the discussion

"Re: Event commands in Core 4 problems"

To view the discussion, visit: http://community.zenoss.org/message/69029#69029

--------------------------------------------------------------
Seems I was missing the directory to execute the script in. I inserted a cd /opt/zenoss/libexec/ into the first line of the event command and it is now working. Ugh, sometimes the little things. I should be able to insert dynamic values using iSQL from the script now, right? Have you seen this done using iSQL before where I can insert the event values into the table?

Right now I am just inserting:
insert into servererrors VALUES ('2010-10-7', '1234', 'testing', '1')

But I would like to insert the values of the event error.

Thanks for all your help getting this diagnosed.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69029#69029]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Shane Scott
2012-10-11 15:46:04 UTC
Permalink
Shane Scott [http://community.zenoss.org/people/hackman238] created the discussion

"Re: Event commands in Core 4 problems"

To view the discussion, visit: http://community.zenoss.org/message/69024#69024

--------------------------------------------------------------
Court:

Glad its working. You can use dynamic values by passing tales. For example, the device Ip would be ${here/manageIp}.

Best,
--Shane Scott (Hackman238)
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69024#69024]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Court Harris
2012-10-11 18:09:43 UTC
Permalink
Court Harris [http://community.zenoss.org/people/courtneyjh] created the discussion

"Re: Event commands in Core 4 problems"

To view the discussion, visit: http://community.zenoss.org/message/69033#69033

--------------------------------------------------------------
Shane,

One other quick question. When I execute my script like this it works:

cd /opt/zenoss/libexec/
bash isqlscript.sh 2012-10-11 5 0 0

When I execute like this trying to replace the 5 with the component like this, it stops executing:

cd /opt/zenoss/libexec/
bash isqlscript.sh 2012-10-11 ${evt/component} 0 0


Any ideas on what I need to change?
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69033#69033]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Court Harris
2012-10-11 18:17:16 UTC
Permalink
Court Harris [http://community.zenoss.org/people/courtneyjh] created the discussion

"Re: Event commands in Core 4 problems"

To view the discussion, visit: http://community.zenoss.org/message/69034#69034

--------------------------------------------------------------
This is the script:

#!/bin/bash
date=$1
device=$2
desc=$3
clear=$4


touch /opt/zenoss/README1.txt
echo "done touch"


isql -v data sa 1234 << EOF
insert into servererrors VALUES ('${date}',${device},${desc},${clear});
EOF
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69034#69034]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
jmp242
2012-10-11 18:31:59 UTC
Permalink
jmp242 [http://community.zenoss.org/people/jmp242] created the discussion

"Re: Event commands in Core 4 problems"

To view the discussion, visit: http://community.zenoss.org/message/69037#69037

--------------------------------------------------------------
I don't know as much as Shane, but have you considered doing:
/opt/zenoss/libexec/isqlscript.sh 2012-10-11 ${evt/component} 0 0

I always make my commands in zenoss one line, not a multiline script in themselves...

--
James Pulver
ZCA Member
LEPP Computer Group
Cornell University
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69037#69037]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Shane Scott
2012-10-11 18:38:31 UTC
Permalink
Shane Scott [http://community.zenoss.org/people/hackman238] created the discussion

"Re: Event commands in Core 4 problems"

To view the discussion, visit: http://community.zenoss.org/message/69041#69041

--------------------------------------------------------------
Court:

Did the test event have a component assigned? Try ${evt/message} as a test.

Best,
--Shane Scott (Hackman238)
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69041#69041]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Court Harris
2012-10-11 19:07:48 UTC
Permalink
Court Harris [http://community.zenoss.org/people/courtneyjh] created the discussion

"Re: Event commands in Core 4 problems"

To view the discussion, visit: http://community.zenoss.org/message/69038#69038

--------------------------------------------------------------
That works with the message as a test. For some reason this code is working:

cd /opt/zenoss/libexec/
bash isqlscript.sh 2012-10-11 0 ${evt/message} 0


And this code is not:

cd /opt/zenoss/libexec/
bash isqlscript.sh 2012-10-11 ${evt/device} ${evt/message} 0
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/69038#69038]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Loading...