Discussion:
zencommand Received exit code: 1
Tzach Solomon
2012-03-20 20:57:17 UTC
Permalink
Tzach Solomon [http://community.zenoss.org/people/tzach] created the discussion

"zencommand Received exit code: 1"

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

--------------------------------------------------------------
Hi,

When testing my script using zencommand run -d i recieve exit code 0
BUT when the zencommand is running the script it Received exit code: 1  and 'No output from plugin' and Code: 1 - Msg: General error'

Can anyone please help???

Is there a tutorial any where on how to write monitoring template ( and I do not mean the exmaple in the site )?

Thanks in advance,
Tzach
--------------------------------------------------------------

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

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]
dpetzel
2012-03-20 21:53:28 UTC
Permalink
dpetzel [http://community.zenoss.org/people/dpetzel] created the discussion

"Re: zencommand Received exit code: 1"

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

--------------------------------------------------------------
There is no tutorial, there are webcasts that are linked from the fron page, I think I remember one of them covering monitoring templates.

That said, what is your script doing, under what conditions would it return an exit code of 1? Does it require input parameters? Are you using the same set of input parameters as is being sent via the monitoring template?
--------------------------------------------------------------

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

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]
Tzach Solomon
2012-03-21 07:57:34 UTC
Permalink
Tzach Solomon [http://community.zenoss.org/people/tzach] created the discussion

"Re: zencommand Received exit code: 1"

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

--------------------------------------------------------------
Hi dpetzel,

Thanks for the quick reply.
Can you please direct me to the webcast?

Actually I don't know why zenoss saying my script returns exit code since my script exists with sys.exit(0)

What is more strange is that zencommand -d says my script returns with exit code 0
While zencommand daemon says my script returns with exit code 1

How can I check it???

Thanks,
Tzach
--------------------------------------------------------------

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

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]
Tzach Solomon
2012-03-25 15:48:39 UTC
Permalink
Tzach Solomon [http://community.zenoss.org/people/tzach] created the discussion

"Re: zencommand Received exit code: 1"

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

--------------------------------------------------------------
I found my problem.
I use in my script the logging module.
Appeartnly, while testing it okay using zencommand -d and while developing it on eclipse, when the zencommand runs it as daemon it can't run the following line:
logging.basicConfig(filename='log.log', level=logLevel, filemode='w', format=formatString)

So I had to remove it from the python script.
--------------------------------------------------------------

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

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...