kenn2347

updated

16 years ago

K

kenn2347

4 Apprentice

•

542 Posts

0

3062

July 20th, 2010 12:00

Saving Event log by a script

I am looking to see if there is a way to save the event logs from each SP to a share where they can then be used with another log parsing appliance/application.

I know you can manually save them by clicking the "save" button but that can be very tedious when you have 7 arrays.

There is a CLI command to view them (naviseccli -h SPA getlog -h -em ) but i cant seem to find a command to place that info into a txt file and then save it.

Anyone know if this is possible.  The plan is to script this from a management host to a shared directory so the parsing program can access them.

Thanks

  • dynamox

    11 Legend

    •

    20419 Posts

    •

    87439 Points

    1778

    0

    Posted July 20th, 2010 12:00

    Can you redirect output from that command to a text file ?

  • kenn2347

    4 Apprentice

    •

    542 Posts

    1784

    0

    Posted July 20th, 2010 12:00

    Ok that is cool.   I also tried the -Overwrite y command and that worked.   Now i am just trying to figure out how i can run this thing once a day but not keep getting that same old data.

    There is a -date (start_date end_date) argument but to use it i would have to keep adjusting the script daily...

  • AranH1

    2163 Posts

    1784

    0

    Posted July 20th, 2010 12:00

    Nice, I didn't know that one

    dynamox wrote:

    use >> if you need to append to an existing file.

  • kenn2347

    4 Apprentice

    •

    542 Posts

    1784

    0

    Posted July 20th, 2010 12:00

    Ok that worked:)  I dont use CLI  often so i dont know what all those keys do.   looks like that > is what i need.

    Thanks again guys

  • AranH1

    2163 Posts

    1784

    1

    Posted July 20th, 2010 12:00

    What dynamox meant was use an output modifier in your cli arguement.

    if you use 'naviseccli -h SPA getlog -h -em > c:\event.txt' this will send the output to a text file and not display it in the cli window.

  • kenn2347

    4 Apprentice

    •

    542 Posts

    1778

    0

    Posted July 20th, 2010 12:00

    Thats what i am trying to see if anyone knows.   I know for retrieving analyzer files, they have a -file & -location parameter but i cant get those to work with the getlog command.

  • dynamox

    11 Legend

    •

    20419 Posts

    •

    87439 Points

    1784

    0

    Posted July 20th, 2010 12:00

    use >> if you need to append to an existing file.

  • kenn2347

    4 Apprentice

    •

    542 Posts

    1784

    0

    Posted July 20th, 2010 13:00

    That argument is not in the CLI guide but when i do a getlog ?, it shows up and works.  i was testing it by grabing a few dates at a time. 

    As for installing perl, the box it would need to be installed on also hosts SMC, SPA and the rest of our SAN managment software.  So i am not sure if all that stuff works well together.  

    Plus the customer is looking for something that will give them events close to realtime and i dont think this way will work.   They dont have ECC.

  • dynamox

    11 Legend

    •

    20419 Posts

    •

    87439 Points

    1784

    0

    Posted July 20th, 2010 13:00

    Kenn,

    i just checked navicli guide and did not see that argument for getlog.  Can you install perl on this box ..i can help you write something in perl ?

  • dynamox

    11 Legend

    •

    20419 Posts

    •

    87439 Points

    179

    0

    Posted July 20th, 2010 13:00

    i have perl installed on boxes running ECC, SMC., SPA ..all get alone. If you need real time i guess you can configure emal alerts on the array itself ?