I don¹t know about getting the EventTable files this way. You can get the Pcause files from:
http://oneclick:8080/spectrum/event-config/do/alarmPCause?format=html&pcause =69379 This is definitely not documented, and support doesn¹t know anything about how to do this. (When I asked about getting this info via the CORBA API, I was simply told no.) I found both URLs by sniffing traffic between the OneClick client and server. You could probably find the EventTable URL the same way. HTH, Jim On 2/10/11 10:11 AM, "Henrichs, Joern" <[email protected]> wrote: > Hi Jim, Ken, All, > > We just finished doing the same thing (constructing the event message from > event format file and the variables) for the same reason (Ticket system). > As we did not know about the possibility to get the right format file from > OneClick, we used the files itself. But this sounds really interesting. > However, is it possible to get the content of the EventTable files the same > way? Is this documented somewhere? > > Cheers, > Joern > > > Joern Henrichs > Senior System Engineer > Infrastructure Services & Support > > Computacenter AG & Co oHG > Services & Solutions > > Voltastraße 1, 60486 Frankfurt, Germany > Tel.: +49 69 97779 342 > Mobile: +49 173 2946155 > Fax: +49 69 97779 110 > Short-Dial: 22342 > E-Mail: [email protected] > <mailto:[email protected]> > WWW: www.computacenter.de <http://www.computacenter.de/> > > > Von: Pfleger, Jim [mailto:[email protected]] > Gesendet: Donnerstag, 10. Februar 2011 16:15 > An: spectrum > Betreff: Re: [spectrum] Event Message extraction with CORBA > > Unfortunately, this isn't as straightforward as it ought to be. The first > thing you need to do is get a handle for the event domain, which is just like > getting the model domain. (Note that the instructions for how to do it in the > API Reference PDF are completely wrong.) > > CORBAHelper helper = CORBAHelper.getHelperImpl(); > Properties props = new Properties(); > props.setProperty("user.name", username); > props.setProperty("CORBAHelper.password", password); > helper.init(null, props); > CsCEventDomain ed = (CsCEventDomain) > helper.getObjectImplementation(CsCEventDomain.class, hostname); > > I'm assuming that you can already retrieve the alarm you want. When you > retrieve the alarm, make sure to request CsCorbaAlarmHelper.EVENT_ID_LIST as > one of its attributes. This is the list of all the event IDs associated to > this alarm. Once you have that attribute stored in CsCValue value, then > value.eventIDList() is a byte[][] - an array of event IDs, which are byte[]. > The originating event ID is always the first element. > > If you want to retrieve all the associated events, replace eventIdList below > with value.eventIDList(). Otherwise, the one event you want will be in event > at the end of this snippet. > > byte[][] eventIdList = new byte[][] {value.eventIDList()[0]}; > int[] reqAttrs = {CsCorbaEventHelper.TYPE_ATTRIBUTES}; /* This means retrieve > all the varbinds */ > CsCEventList el = ed.getEventList(eventIdList, reqAttrs); > CsCEvent event = el.list[0]; > > Now that you have the event in a usable format, you can get at all the > varbinds. Just like in an alarm, event.attrValList.list contains all the > attributes in no particular order. You'll need to iterate through the list, > looking at each attribute's attributeID to find the ones you're interested in. > For example: > > for (CsCAttrValue event_attr : event.attrValList.list) { > switch (event_attr.attributeID) { > case INTERESTING_ATTR: > /* Do something with event_attr.value */ > break; > } > } > > The attribute IDs are the numbers you used in the AlertMap to assign trap > varbinds to event attributes. > > If you want the actual text that OneClick shows (the event format file), this > is not available through the CORBA API. However, you can get it from a > OneClick server at: > > http://oneclick:8080/spectrum/event-config/do/eventFormat?format=text&event=69 > 379 > > The event value is the decimal representation of the event code. The only > other format option I've found is "html". > > One final caveat - if you're relying on retrieving events, note that they're > only available from the primary SpectroServer. If you've failed over to the > secondary, even though it's storing events, those events are not available > through the CORBA API. > > Please feel free to contact me directly if you have any other questions or > issues. > > HTH, > Jim > --- To unsubscribe from spectrum, send email to [email protected] with the body: unsubscribe spectrum [email protected]
