Jan Kapellen
2013-12-27 17:00:55 UTC
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]
"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]