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

Please support JSON as report format #18

Closed
hvhaugwitz opened this issue Apr 9, 2019 · 14 comments
Closed

Please support JSON as report format #18

hvhaugwitz opened this issue Apr 9, 2019 · 14 comments
Labels
enhancement New feature or request
Milestone

Comments

@hvhaugwitz
Copy link
Member

To better support processing of the report by machines, AIDE should support JSON as report format.

@hvhaugwitz hvhaugwitz added the enhancement New feature or request label Apr 9, 2019
@hvhaugwitz hvhaugwitz added this to the 0.17 milestone Apr 9, 2019
@hvhaugwitz hvhaugwitz modified the milestones: 0.17, 0.18 Jun 9, 2019
This was referenced Jan 31, 2021
@elico
Copy link

elico commented Apr 2, 2021

@hvhaugwitz Are there any missing parameters in the current format?

@hvhaugwitz
Copy link
Member Author

What do you mean by missing parameters in the current format?

@elico
Copy link

elico commented Apr 2, 2021

@hvhaugwitz as a transition phase a simple report conversion to json can help.
As far as I can tell from what I see in my reports is that every section of the report has it's own format ie:

command
Start time
AIDE found differences between database and filesystem!!
<\n>
<title:>Summary:
<\s\s> section
<\n>
<--....>
<title:>Added entries:
<--....>
<\n>
<list of new files and directories>
<\n>
<--....>
<title:>Changed entries:
<--....>
<\n>
<list of changed enteries>
<\n>
<--....>
<title:>Detailed information about changes:
<--....>
<\n>
<list of file changes with a leading space to each section/file and separated by a \n>
<\n>
<--....>
<title:>The attributes of the (uncompressed) database(s):
<--....>
<\n>
<DB Attributes>
<\n>
<\n>
<End timestamp>
<\n>

I believe it's pretty easy to script the basic transformation to json.

@hvhaugwitz
Copy link
Member Author

Sure, it should be possible to write a wrapper script to transform the current (human) report format to JSON format. The native support for JSON report format is planned for the upcoming release.

@elico
Copy link

elico commented Apr 4, 2021

@hvhaugwitz Is there any specific date for this release?

@elico
Copy link

elico commented Apr 4, 2021

@hvhaugwitz I wrote this tiny tool that converts a specific example log file into an experimental json format.
https://github.com/elico/aide-tools

Of-course it's basic parser so it would be possible to do better job later.
It will probably be useful for older systems which doesn't have the option to re-compile and install aide.
With enough work on this script it would be possible to also export to external DBs if not supported or to report an external URL on a change in the system.

I wanted to know if the format I am using is similar to what you have planned for aide.
Also any specific improvements to my script are more then welcome.
The license is not there yet but it's MIT 3 Clause BSD.

@hvhaugwitz
Copy link
Member Author

@hvhaugwitz Is there any specific date for this release?

No, not yet.

I wanted to know if the format I am using is similar to what you have planned for aide.

Can you provide an example json output along with your example log file?

The license is not there yet but it's MIT 3 Clause BSD.

Please add a license so others can use your script without knowing this issue.

@elico
Copy link

elico commented Apr 5, 2021

@elico
Copy link

elico commented Apr 5, 2021

@hvhaugwitz I'm looking for other logs to verify what I might be able to improve in the parser.

@hvhaugwitz hvhaugwitz added the in progress The development for this issue is in progress label May 30, 2021
@arafatx
Copy link

arafatx commented Sep 9, 2021

Using wrapper for json output would be slow. Love to see this feature would be added as a native option.

@konstantin-921
Copy link

We plan to send AIDE reports to the ELK and process them like normal logs. It would be ideal for us if the reports supported JSON format because it would make it much easier to process reports at Logstash level.

@hvhaugwitz hvhaugwitz removed the in progress The development for this issue is in progress label Jun 15, 2022
@hvhaugwitz
Copy link
Member Author

Native json support for reports is now available in master branch.

Please give it a try and report back any issues.

@munntjlx
Copy link

has this been comitted to any release yet?

@hvhaugwitz
Copy link
Member Author

has this been comitted to any release yet?

This has been released with AIDE 0.18 (see https://github.com/aide/aide/blob/v0.18.6/NEWS#L51)

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

No branches or pull requests

5 participants