Discussion:
zenoss + sms, where is the error?
da shan
2012-03-19 10:05:41 UTC
Permalink
da shan [http://community.zenoss.org/people/dashan] created the discussion

"zenoss + sms, where is the error?"

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

--------------------------------------------------------------
Hi everybody,

I'm having a hard time to get my send-sms script to work. if i execute it on the commandline, everything works perfect. but when i try to send a message from zenoss (test-msg or based on a event), nothing happends. But in every case the correct messaged gets logged in the file. Where is my error?

I use gnokii to connect to a nokia mobile phone.


Here is my code on pastebin: http://pastebin.com/VFq674ar http://pastebin.com/VFq674ar


Thx very much in advance!

Any help is welcome!

I'm using zenoss 3.2.1
--------------------------------------------------------------

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

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-03-19 20:45:34 UTC
Permalink
Shane Scott [http://community.zenoss.org/people/hackman238] created the discussion

"Re: zenoss + sms, where is the error?"

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

--------------------------------------------------------------
da shan:

Just a guess, but I'd verify that zenoss is in the sudoers file and might even suggest you throw a +s on that bin requireing sudo priv. I'd then verfy that it runs by hand as the zenoss user. Are you executing this script using an eventcommand?

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

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

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]
da shan
2012-03-20 14:41:45 UTC
Permalink
da shan [http://community.zenoss.org/people/dashan] created the discussion

"Re: zenoss + sms, where is the error?"

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

--------------------------------------------------------------
Hi Shane,

thank you for your reply!
Post by Shane Scott
I'd verify that zenoss is in the sudoers file
zenoss ALL= NOPASSWD: /usr/bin/gnokii

As the zenoss-user, I can execute the script without any problems. My message gets logged and the sms gets send immediately. When zenoss executes the script (i set up a page-alerting-rule, which i trigger through an manually created event) the device-name and the correct message as well as the correct page-number is logged in my log-file.
From that I get:
-> Zenoss can execute the script
-> The script gets the correct message from zenoss, through std-in
-> The script gets the correct number

I think my problem is either the method of calling gnokki (os.process vs. subprocess.popen) or the fact that gnokki takes some time to execute.
--------------------------------------------------------------

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

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]
da shan
2012-03-21 15:09:17 UTC
Permalink
da shan [http://community.zenoss.org/people/dashan] created the discussion

"Re: zenoss + sms, where is the error?"

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

--------------------------------------------------------------
does nobody use the combination of zenoss + gnokii + sms? if you use another combination of software to send sms please tell me!

at this point any help is appreciated!
--------------------------------------------------------------

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

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