DX NetOps

 View Only
Expand all | Collapse all

Export Events From CA Spectrum

  • 1.  Export Events From CA Spectrum

    Posted Feb 24, 2016 09:25 AM

    Hi Friends,

     

    We are looking for event exports mechanism, so all events can be dump in a file. Do we have any mechanism which help us to export all events

     

    Regards\Manpreet Singh



  • 2.  Re: Export Events From CA Spectrum

    Posted Feb 24, 2016 10:55 AM

    If you navigate to 'Events' tab on OneClick, there is an option to export to CSV or Text or HTML (the icon with a folder and curved arrow)



  • 3.  Re: Export Events From CA Spectrum

    Posted Feb 24, 2016 05:52 PM

    Hi Vastas,

     

    Thanks for reply but here i looking for export option from CLI or thru database query

     

    Regards\Manpreet Singh



  • 4.  Re: Export Events From CA Spectrum

    Posted Feb 24, 2016 11:49 PM

    Method # 1: From CLI

    1. Navigate to $SPECROOT/vnmsh and connect

    2. ./show events > SSEvents.txt

    Above steps will dump all events from a specific SpectroSERVER to a text file

     

    Method # 2: From MySQL

    1. Navigate to $SPECROOT/mysql/bin and execute command

    ./mysql --defaults-file=../my-spectrum.cnf -u<MYSQLROOTUSER> -p<MYSQLROOTUSERPWD> ddmdb

    2. Execute below command at mysql prompt

    SELECT model_h, utime, counter, clk_seq, version, node_id, user_key, type, severity INTO OUTFILE '/tmp/SSEvents.csv' FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' FROM event;

    I did not mention all fields/columns of event table in step # 2, if you need all, then replace all files with '*'

     

    If you want all events from all SpectroSERVERs, then from OneClick console you have to follow method # 2, but instead of 'ddmdb', you should use 'reporting' as the DB Name.

     

    Hope this helps



  • 5.  Re: Export Events From CA Spectrum

    Posted Feb 24, 2016 06:00 PM

    The Command Line Interface "show events" is OK for displaying the events for a single model but not so good for trying to show all events.

     

    Direct mysql queries directly to the DDM database would be the way to go.



  • 6.  Re: Export Events From CA Spectrum

    Posted Feb 24, 2016 06:08 PM

    It would be really appreciated if you can give me exact query or command  which i can run in mysql & get all event.

     

    I am not mysql expert



  • 7.  Re: Export Events From CA Spectrum

    Posted Feb 25, 2016 01:35 AM

    Hi Manpreet,

     

    How about this:

     

    You shall login and execute as below:

     

    mysql -e "select * from event WHERE utime>TIMEFRAME" -u root -p root ddmdb >eventdmp.txt

     

    ==

    e flag - to execute

    utime - time range

    TIMEFRAME - You shall replace this frame with the time stamp after which you want event data to be exported

    ddmdb - DB name

    ==

     

    Haven't tested though But it should look like that.

     

    Cheers!

    Lakshmi.



  • 8.  Re: Export Events From CA Spectrum

    Posted Feb 24, 2016 09:11 PM

    Hi

    Go through below link I think it will help you out

     

    https://communities.ca.com/thread/241720196?forceNoRedirect=true

    On 24 Feb 2016 19:56, "Sohal" <communityadmin@communities-mail.ca.com>



  • 9.  Re: Export Events From CA Spectrum

    Posted Feb 25, 2016 02:48 AM

    Hi,

    my support partners wrote a tool, which can export events (and/or model informations).

    I'll share your question with them.

    Regards, Frank



  • 10.  Re: Export Events From CA Spectrum

    Posted Feb 25, 2016 03:04 AM

    I would also be interested to know if they don't run db query for events data / CLI query for models show up / rest call (back end).

     

    Cheers!

    Lakshmi.



  • 11.  Re: Export Events From CA Spectrum

    Posted Mar 10, 2016 09:41 AM

    Hi,

    the developer is very busy at the time, so i'll try to answer.

    I'm not the expert for describing, how it works. As far as I know, uses this tool CORBA.

    I use it since a few months to export the events for devices in a global collection, filtered by eventtype and precedence.

    The export format can be Excel or CSV or PDF.

    But the filters are flexible.

    Regards, Frank



  • 12.  Re: Export Events From CA Spectrum

    Posted Mar 10, 2016 07:53 AM

    Hi,

    have you tested the export events tool that you've mentioned? I'm interested about it.

     

    regards,T.



  • 13.  Re: Export Events From CA Spectrum

    Posted Mar 12, 2016 09:32 AM

    Hi all,

    I recommend not to query the DDMDB because this main-database of spectrum is used by many processes.

    Queriying the events could cause problems.

     

    It would be better to query the Report-Manager-DB, "SRM" which was specially made for "Reporting".

    All Events should arrive in this SRM-DB after around 60 minutes.

     

    In any way, - when running SQL-Queries in a database, you should be familier with the SQL-Language to build a efficient SQL-Query which fetches only the needed data. for example, - query only the events of the past x- days. .. calculate the timestamp of the date first and then query the events which are "newer" than your reference-date. .. do not convert or do not use functions in the "where"-clause.

     

    Best Regards

    Erich Heinemann



  • 14.  Re: Export Events From CA Spectrum

    Posted Mar 14, 2016 01:24 AM

    Hi,

     

    Agreed , we shall query SRM-DB. But I'm not sure what problem would happen if we just run a query to retrieve DDMdb data (with no edit/update any record in DDM) - Rather when we say processes use data in DDMDB, it's again will be queries that would run in backend to either update/retrieve data from DDB DB If it's not recommended , CA wouldn't have documented the queries ..

     

    But I would love to know the tool-definition  your partners developed as it's interesting

     

    Cheers!

    -Lakshmi.



  • 15.  Re: Export Events From CA Spectrum

    Posted Mar 14, 2016 08:04 AM

    From what I remember the SRM data is available on OneClick servers in the 'reporting' database, so this shouldn't affect any landscapes.

     

    Regarding querying the events directly from the landscapes, I think this would depend on your infrastructure. If you have full landscapes with a lot going on, I think it might not be a good idea. If you have a medium landscape with a lot of horsepower then there shouldn't be an issue. I don't believe in running a landscape at full capacity. Rather have 2-3 landscapes with an even load then have one full one. There are just too many benefits to have them spread over multiple landscapes.

     

    We query our landscape events often and don't have any major issues (Spectrum 10).



  • 16.  Re: Export Events From CA Spectrum

    Posted Mar 18, 2016 10:24 AM

    A dump for backup or just to query particular events ? I use the "srmdbapi" database to query events in lab, but with the events tab in oneclick is enought.

    Diego MP