Skip to content

More decoder testing #424

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

Merged
merged 5 commits into from
Oct 31, 2014
Merged

More decoder testing #424

merged 5 commits into from
Oct 31, 2014

Conversation

jrossi
Copy link
Member

@jrossi jrossi commented Oct 31, 2014

No description provided.

@ddpbsd
Copy link
Member

ddpbsd commented Oct 31, 2014

Is this stuff documented anywhere? I'd love to read it if it is, or if you have some notes you can share I don't mind writing the docs.

ddpbsd added a commit that referenced this pull request Oct 31, 2014
@ddpbsd ddpbsd merged commit 090bf96 into ossec:master Oct 31, 2014
@jrossi
Copy link
Member Author

jrossi commented Oct 31, 2014

No docs but started oRFC so will add them into that pull request.

Right now if you are in src and run make test-rules it runs the rule tests. Tests are currently in contrib/ossec-test/tests.

Will move away from Python system to ossec-lua soon as it means on less requirement

@ddpbsd
Copy link
Member

ddpbsd commented Oct 31, 2014

I'll wait for the switch before I really get into documenting it then. Thanks!

@jrossi
Copy link
Member Author

jrossi commented Oct 31, 2014

That will no change anything around the rule testing format. The ini files will stay so you can look into them and start there if you would like.

@ddpbsd
Copy link
Member

ddpbsd commented Oct 31, 2014

Well since I don't understand what the ini files are ini-ing, I don't think I'll start documenting that today.
Like, why pass|fail? Why would we want a check to fail? Do we intentionally make a mistake inputting the data (wrong level or whatever)?

@jrossi
Copy link
Member Author

jrossi commented Oct 31, 2014

Ok makes sense but here are some details.

[rules name goes here must be uniq in file]
log 1 pass = this line must match rules, decoder, and alerts 
log 2 fail = this line must NOT match rules, decoder, and alerts
decoder = name-here
alert = 5
rule = 10000

@ddpbsd
Copy link
Member

ddpbsd commented Oct 31, 2014

Awesome info, thanks! Are there options other than "log" at the beginning of the line?

@jrossi
Copy link
Member Author

jrossi commented Oct 31, 2014

Nope no other options now. "log \d (pass|fail)" are the line feed into ossec-logtest and then from there the output is checked using ossec-logtest -U (http://ossec-docs.readthedocs.org/en/latest/programs/ossec-logtest.html#cmdoption-ossec-logtest-U)

@jrossi jrossi deleted the more-decoder-testing branch November 18, 2014 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants