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

http post api #3040

Closed
ozgursuder opened this issue Nov 16, 2020 · 9 comments
Closed

http post api #3040

ozgursuder opened this issue Nov 16, 2020 · 9 comments

Comments

@ozgursuder
Copy link

ozgursuder commented Nov 16, 2020

Hello there

I have an api access information as follows.

I can get the src_ip part here from elastalert.

I wonder how can I write the above code to the api using http post

this api code is a code belonging to the firewall

@ozgursuder
Copy link
Author

image

@nsano-rururu
Copy link
Contributor

@ozgursuder
Copy link
Author

I looked at this and wrote it here because I failed

@lastbulletbender
Copy link

I don't think there is any string substitution happening for post_url which can replace the src_ip. @ozgursuder

@ozgursuder
Copy link
Author

I can post the src_ip part but I have no idea how to split it as post url

@lastbulletbender
Copy link

I have no idea how to split it as post url

I don't think this is possible with the current HTTPPostAlerter implementation. You can write a small server which translates the post to the suitable URL and makes the requests on elastalert's behalf.

So it will look like

elastalert -> your_small_translation_server -> actual_destination

I was thinking of writing a more feature rich webhook implementation if there's a requirement.

@ozgursuder
Copy link
Author

Frankly, many will want to connect through the firewall api and I think this will be needed.

@lastbulletbender
Copy link

Unfortunately, this repo is not being actively maintained.

#2947

I'll try writing the webhook implementation if i get the time and create a PR in case this project ever becomes active.

@lastbulletbender
Copy link

@ozgursuder I have created a PR and added an alerter which should allow you to create the URL as you need

#3042

It still needs to be reviewed though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants