Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add impact and urgency as optional params for the servicenow alerter #316

Merged
merged 4 commits into from
Jun 30, 2021

Conversation

randolph-esnet
Copy link
Contributor

Extend the Servicenow alerter to support two new parameters: impact and urgency.

More info on these parameters can be found on the Servicenow doc page on defining priority lookup rules.

These are added as optional parameters to ensure backwards compatibility.

@nsano-rururu
Copy link
Collaborator

It's an additional impact and urgency, but I think it's better to prefix it with servicenow_.

@nsano-rururu
Copy link
Collaborator

Although it is an additional impact and urgency, since integer is specified in schema.yaml, in the actual rule, if you enclose it in single quotation marks or double quotation marks, an error will occur when executing the actual rule.
It doesn't cause an error in unit tests, but in the sense that it is close to the actual data, I think it is better not to enclose it in single quotes.

@randolph-esnet
Copy link
Contributor Author

It's an additional impact and urgency, but I think it's better to prefix it with servicenow_.

Thank you. I'll add the servicenow prefix for the new parameters.

@randolph-esnet
Copy link
Contributor Author

It's an additional impact and urgency, but I think it's better to prefix it with servicenow_.

Thank you. I'll add the servicenow prefix.

@randolph-esnet
Copy link
Contributor Author

...I think it is beter not to enclose it in single quotes.

To make sure I understand, are you suggesting to omit the quotes in the unit test?

@nsano-rururu
Copy link
Collaborator

nsano-rururu commented Jun 30, 2021

If schema.yaml is written as follows, the value will be checked and an error will occur when a rule other than 1,2,3 is specified and the rule is executed.

  servicenow_impact: {type: integer, minimum: 1, maximum: 3}
  servicenow_urgency: {type: integer, minimum: 1, maximum: 3}

Supplement. jsonschema checks the key and data type etc. listed in schema.yaml.

@nsano-rururu
Copy link
Collaborator

...I think it is beter not to enclose it in single quotes.

To make sure I understand, are you suggesting to omit the quotes in the unit test?

If you don't agree, you can leave it as it is.

@randolph-esnet
Copy link
Contributor Author

If schema.yaml is written as follows, the value will be checked and an error will occur when a rule other than 1,2,3 is specified and the rule is executed.

  servicenow_impact: {type: integer, minimum: 1, maximum: 3}
  servicenow_urgency: {type: integer, minimum: 1, maximum: 3}

Supplement. jsonschema checks the key and data type etc. listed in schema.yaml.

Great suggestion. Thank you.

Copy link
Owner

@jertel jertel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!!

@jertel jertel merged commit 7e470d8 into jertel:master Jun 30, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants