Skip to content

How do I import the rules into Kibana? #656

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

Closed
avi8892 opened this issue Nov 30, 2020 · 16 comments · Fixed by #1073
Closed

How do I import the rules into Kibana? #656

avi8892 opened this issue Nov 30, 2020 · 16 comments · Fixed by #1073
Assignees
Labels
cli command line tooling community question Further information is requested

Comments

@avi8892
Copy link

avi8892 commented Nov 30, 2020

Hi guys, I'm trying to import the rules into Kibana but I can't. Can anyone help me with that?

@jamesspi
Copy link

Hey @avi8892 - How are you trying to import the rules? Via the CLI?

Kibana requires a .ndjson file for UI based uploads. It you are trying to use detections from this repository, you will need to use the included CLI tool to import them via CLI, or covert them from toml to ndjson.

@avi8892
Copy link
Author

avi8892 commented Nov 30, 2020

Hey @avi8892 - How are you trying to import the rules? Via the CLI?

Kibana requires a .ndjson file for UI based uploads. It you are trying to use detections from this repository, you will need to use the included CLI tool to import them via CLI, or covert them from toml to ndjson.

Thanks man!, can you please send me the command that shows how to convert the rules from tmol to ndjson?

@jamesspi
Copy link

@avi8892 Here's the full CLI documentation - https://github.com/elastic/detection-rules/blob/main/CLI.md

@avi8892
Copy link
Author

avi8892 commented Dec 2, 2020

@avi8892 Here's the full CLI documentation - https://github.com/elastic/detection-rules/blob/main/CLI.md

Can you help me with it? no matter what I do it always asking for kibana url.

image

@brokensound77
Copy link
Contributor

Hello @avi8892, there was a bug for a bit but has since been resolved. Ensure you are up to date with main and hopefully that resolves it

@V1D1AN
Copy link

V1D1AN commented Dec 14, 2020

Hi everybody,

I have the same error :( , like @avi8892

@avi8892
Copy link
Author

avi8892 commented Dec 14, 2020

@V1D1AN it is not fixed even I did what was recommended.

@brokensound77
Copy link
Contributor

So it actually is likely not a bug at all but an issue with how you are calling the command. It may be a bit subtle, but if you see under https://github.com/elastic/detection-rules/blob/main/CLI.md#commands-using-elasticsearch-and-kibana-clients, it shows that for commands under the client groups (kibana and es), you need to pass client args immediately after the respective group, such as:

python -m detection-rules kibana -ku <username> -kp <password> upload-rule <...>

So just shift all of your client args to before upload-rule and you should be good to go

@V1D1AN
Copy link

V1D1AN commented Dec 15, 2020

Thanks for your help.
It works with the command:

python3 -m detection_rules kibana --kibana-url http://127.0.0.1:5601/kibana -ku elastic -kp elastic upload-rule

@avi8892
Copy link
Author

avi8892 commented Dec 15, 2020

Thanks for your help.
It works with the command:

python3 -m detection_rules kibana --kibana-url http://127.0.0.1:5601/kibana -ku elastic -kp elastic upload-rule

Why is it trying to access this URL? @brokensound77

image

@V1D1AN
Copy link

V1D1AN commented Dec 15, 2020

I have the same error with ELK 7.10.1 , not the version 7.9.2

@avi8892
Copy link
Author

avi8892 commented Dec 15, 2020

I have the same error with ELK 7.10.1 , not the version 7.9.2

I'm on 7.10 :(

@V1D1AN
Copy link

V1D1AN commented Dec 15, 2020

Error-elastic

@avi8892
Copy link
Author

avi8892 commented Dec 15, 2020

@V1D1AN Sad, I have already installed winlogbeat and everything :/

@V1D1AN
Copy link

V1D1AN commented Dec 22, 2020

Someone has already succeeded in importing rules into kibana ? you need another license than the "BASIC" license.

@threat-punter threat-punter added the question Further information is requested label Jan 12, 2021
@brokensound77 brokensound77 added the cli command line tooling label Mar 29, 2021
@botelastic
Copy link

botelastic bot commented Aug 25, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@botelastic botelastic bot added the stale 60 days of inactivity label Aug 25, 2021
@brokensound77 brokensound77 removed the stale 60 days of inactivity label Aug 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli command line tooling community question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants