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

Kibana/Elasticsearch/Python Setup and Auto-Export #39

Conversation

craig-cogdill
Copy link

I did these 2 cards in one PR, because I did some refactoring in Stage 2 that effected the code from Stage 1.

setDefaultIndex.py sets up the index-pattern as [network_]YYYY_MM_DD and makes it the default index-pattern used by Kibana for displaying metadata info (sidenote: this will be really easy to extend to our other ES index patterns once we decide to open them up like Alex showed in his demo)

loadAssets.py loads all of our dashboards, visualizations, and searches into ES, or updates them if the version in ES is older than the one currently installed on disk.

exportAssets.py is the script used to modify dashboards, visualizations, and searches so that they are exported in the right form for PRs. Just run python exportAssets.py --help for info on how it is used.

Craig Cogdill added 30 commits April 4, 2016 12:27
…ptForInserting

Conflicts:
	packaging/kibana.spec
return asset_title + ".json"

def get_full_path(asset_id):
global OUTPUT_DIR

Choose a reason for hiding this comment

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

Don't make this change now, but so many global variables almost warrants this to be a class.

Copy link
Author

Choose a reason for hiding this comment

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

Okay I will make a note of that for next time

import elasticsearch

class Logger:
MAIN_LOG_FORMAT_STR='%(asctime)s.%(msecs)03d %(levelname)s: %(message)s'
Copy link

Choose a reason for hiding this comment

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

It looks like you tab with two spaces here but four in other files. Try to keep it consistent, but that can be done in the same PR you make the other file (that Shweta mentioned) a class.

@acarb95
Copy link

acarb95 commented Apr 29, 2016

👍


def get_full_path(asset_id):
global OUTPUT_DIR
if OUTPUT_DIR[-1:] == '/':
Copy link

Choose a reason for hiding this comment

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

I don't think you need the colon here. I think OUTPUT_DIR[-1] should work. You can ask Dan or Shweta, they would know better. But if you're trying to get the last element of the list, there shouldn't be a need to splice it.

Copy link
Author

Choose a reason for hiding this comment

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

Good catch

@craig-cogdill craig-cogdill merged commit f62a986 into logrhythm:4.1.4_NM May 2, 2016
craig-cogdill added a commit that referenced this pull request May 3, 2016
[MERGE WITH #39] Fixed filters in dashboard
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

Successfully merging this pull request may close these issues.

3 participants