1 Reply Latest reply: Jan 8, 2013 5:22 AM by tunix2kvw RSS

    CLI - Listing incidents does not list the source of the incident ?

    user12613373
      I'm trying to extract incident data from ops center and I found it strange that the incident output from the CLI doesn't actually give you the source of the incident:


      *$ ./oc -e 'connect;incidents;list -l'*
      Incidents:
      Id |Severity|     State     |  Owner  |         Creation date          |   Last update date        |                                  Description                            |
      --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      *8171|WARNING | UNASSIGNED | None | Tue Nov 13 14:22:15 EST 2012 | Thu Dec 27 09:53:07 EST 2012 | 91.63545% of space is used on /import/foo filesystem.*

      Anyone know of a way to get this information?

      I'm also willing to dig into the database to find it, but I've had no luck looking through the 700+ tables in there to find it.
        • 1. Re: CLI - Listing incidents does not list the source of the incident ?
          tunix2kvw
          Hi,

          the command show_alerts -i give you the wanted result. But you get all alert from the past regarding to your incident.

          You should write a script or commandfile for oc.

          The following command gives you the result. But it perorms an oc connect for every incident. Not applicable for dayly use in large environment.
          for x in $(oc -e 'connect ; incidents.list ' |grep UNASSIGNED |awk '{print $1}'); do oc -e "connect; incidents.show_alerts -i '$x' " ; done




          ciao
          tunix2k