Discussion:
Zenoss API: EventsRouter query parameters ?
Jan Kapellen
2013-12-27 17:00:55 UTC
Permalink
Jan Kapellen [http://community.zenoss.org/people/jkapellen] created the discussion

"Zenoss API: EventsRouter query parameters ?"

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

--------------------------------------------------------------
Hello there,

In previous versions of the EventsRouter (pre 3.0) I was able to send 'prodState' => 'Production' in my params. When I am doing that now (Zenoss Core 4.2), I get the following error back:

'result' => {
                        'success' => bless( do{\(my $o = 0)}, 'JSON::XS::Boolean' ),
                        'msg' => 'ServiceResponseError: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException',
                        'type' => 'exception'
                      }

here's the snippet that generates the query:


        my $reqdata = {
            'action' => 'EventsRouter',
            'method' => 'query',
            'data'   => [{
                'start'  => 0,
                'limit'  => 1000,
                'dir'    => 'DESC',
                'params' => {
                    'severity'   => [ 5, 4, 3, 2 ],
                    'eventState' => [0,1,2],
                    'prodState'  => ['Production'],
                },


            }],
            'type' => 'rpc',
            'tid'  => 5,
        };

I also tried it without the [] around production with the same results. When I delete the line with 'prodState' it works like a charm, but it leaves me with a lot more data to process as compared to what I originally intendet to do.

Any Ideas on the matter?
--------------------------------------------------------------

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

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
hydruid
2013-12-27 17:08:03 UTC
Permalink
hydruid [http://community.zenoss.org/people/hydruid] created the discussion

"Re: Zenoss API: EventsRouter query parameters ?"

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

--------------------------------------------------------------
Take a look at this post: http://community.zenoss.org/thread/19146 http://community.zenoss.org/thread/19146
--------------------------------------------------------------

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

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Jan Kapellen
2013-12-27 17:13:49 UTC
Permalink
Jan Kapellen [http://community.zenoss.org/people/jkapellen] created the discussion

"Re: Zenoss API: EventsRouter query parameters ?"

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

--------------------------------------------------------------
Thank you,

so in other words the correct way to put this filter is something like

'prodState' => [1000],

(which works fine in my setup).

Can someone gently push me in the direction of the documentation of the standard values for production states?
--------------------------------------------------------------

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

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
jmp242
2014-01-02 18:23:25 UTC
Permalink
jmp242 [http://community.zenoss.org/people/jmp242] created the discussion

"Re: Zenoss API: EventsRouter query parameters ?"

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

--------------------------------------------------------------
Take a look at your zenoss config Advanced tab -> Settings. Right there in the right pane are the production state values configured for your Zenoss install.

--
James Pulver
ZCA Member
CLASSE 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/75624#75624]

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