1. Fidel Castro Armario
  2. JIRA Workflow Toolbox
  3. Issues

Issues

Issue #709 new

Restrict creating issues

Nikhil
created an issue

Hi Fidel,

Hi Fidel,

I have few doubts on the configurations for creating Jira tickets with some keywords from Summary or Description which we worked earlier:

I have used the below validator in the workflow but this validator works only if the email alert has the strings provided or else the issue will not be created. But I want issues to be created with or without these strings. Basically, this validator must be optional with OR condition so that incident will still continue to get created.

Only if the following boolean expression is true: "DOWN" in %{Summary} OR "State: DOWN" in %{Description} OR "CAIHIRT901 is DOWN" in %{Summary} Message to show when validation fails: "Please check with your Jira administrator if you are receiving this message". Above validator was to create incidents with mentioned strings.

BUT: Can we have a validator in such a way that issues must not get created when the there is "UP" or "CAIHIRT901 is UP" keywords in the Summary or Description of incoming email alerts and Incidents must continue to create for any other keywords like "DOWN" or CAIHIRT901 is DOWN" in the alerts?

Nikhil

Comments (8)

  1. Fidel Castro Armario repo owner

    Hi Nikhil,

    When a validator fails the transition where it's inserted can't be executed. When we insert a validator in "Create Issue" transition, then a validator failure will prevent issue from being created.

    I don't understand what you mean by "...I want issues to be created with or without these strings...". If you don't mind the presence of those strings, then you simply don't need any validator.

    In order to block issue creation when "UP" and "CAIHIRT901 is UP" are in the Summary you should use another boolean validator with the following expression:

    "UP" not in %{00000} AND "CAIHIRT901 is UP" not in %{00000} 
    

    where %{00000} is field code for Summary.

  2. Nikhil reporter

    Hi Fidel,

    I meant that the validator must work optionally. This validator should not stop creating tickets if the keywords aren't found. I will do this workaround and get back to you.

    Nikhil

  3. Fidel Castro Armario repo owner

    Nikhil,

    Validator "DOWN" in %{00000} OR "State: DOWN" in %{00001} OR "CAIHIRT901 is DOWN" in %{00000} will require the presence of any of those 3 words in Summary or Description. If none of the words are present, the validator fails and the issue will not be created.

    When do you need that optionally the validator is not applied?

  4. Nikhil reporter

    Fidel,

    Basically, there will be a lot of Incidents that gets generated daily and one among them are from Nagios tool. Whenever, Nagios is DOWN/UP Nagios send out alerts to Jira and Jira will create ticket for that alert. Now, this validator should not stop other Incidents to get created as other Incidents are created for some other purposes.

    So, I have to come up with a plan where Jira only create issues while Nagios sends out DOWN status alert to Jira and ignore UP alerts to generate tickets in Jira, though Nagios keeps sending UP alerts as well.

    Nikhil

  5. Fidel Castro Armario repo owner

    If you don't expected UPs and DOWNs mixed in a same mail, the following validator will be enough:

    "DOWN" in %{00000} OR "State: DOWN" in %{00001} OR "CAIHIRT901 is DOWN" in %{00000}
    

    but if you expect DOWNs and UPs mixed in a same mail, and want to prevent issue creation whenever there is an UP, even if there is also a DOWN in the same email, i.e., if you give priority to UPs over DOWNs, then you can use the following validator:

    ("DOWN" in %{00000} OR "State: DOWN" in %{00001} OR "CAIHIRT901 is DOWN" in %{00000}) AND "UP" not in %{00000} AND "CAIHIRT901 is UP" not in %{00000}
    

    Anyway, I have the feeling that there is something that I'm not understanding in your requirements.

  6. Nikhil reporter

    The requirement is something like this:

    When an alert such as: RECOVERY Host Alert: AP1HIRT510 is UP is received, script the automation of finding the matching alert that includes: PROBLEM Host Alert: AP1HIRT510 is DOWN and mark the ticket as "Resolved" with the Resolution of "Service Recovery". Close the newly generated "Recovery" ticket with the same Resolution. Do we have a way to configure this?

    Nikhil

  7. Nikhil reporter

    Fidel Castro Armario If I set some Validator in a workflow transition, then the validator checks if the strings provided exists in the incoming Nagios notification alerts. If found then issue will be created if not then issue creation won't happen. This actually stops creating issues for other subjects as well. So, can we have this Validator as OR condition? Like, if there is not alerts received from Nagios, it should not restrict creating issues for other reasons.

    Nikhil

  8. Fidel Castro Armario repo owner

    Hi Nikhil,

    In relation your first question: I think it can be done, but I need a more general and detailed description of the behavior you want to implement:

    • Are "RECOVERY Host Alert: AP1HIRT510 is UP" and "PROBLEM Host Alert: AP1HIRT510 is DOWN" the Summary or the Description of the issue?
    • Are those the only 2 kind of messages you can receive from Naggios, or the only 2 ones you are interested in?
    • Is AP1HIRT510 the only variable part of those 2 kinds of messages?
    • Can you add some screenshots showing the Summary and Description of real issues created by Naggios?

    Please, take your time to do a detailed description with all the possibilities we can encounter, since I'm going to take my time to explain you in detail how to implement your desired behavior. Otherwise, both of us will be wasting our time.

    In relation with your second question: Can you give a word or a phrase that always appears in an issue created by Naggios? If you can, I can give you a modified boolean expression to make the validator pass with any issue not created by Naggios.

  9. Log in to comment