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

Application specific addition (openHAB) #46

Open
ThomDietrich opened this issue May 10, 2017 · 6 comments
Open

Application specific addition (openHAB) #46

ThomDietrich opened this issue May 10, 2017 · 6 comments
Assignees

Comments

@ThomDietrich
Copy link
Member

ThomDietrich commented May 10, 2017

Hey @willemdh, just wanted to ask before I invest any effort. Would you consider merging openHAB specific statistics? (version, opstate, overall devices and rules defined... could be a oneliner)
Obviously that's pretty specific for one application and might exceed the scope and maintainability of the one FireMotD script file...

@willemdh
Copy link
Member

willemdh commented May 10, 2017

@ThomDietrich I absolutely have no problem with that. As long as you provide the necessasry if variable exists => show variable code
And also when I ever have the time and energy to convert FireMotD so i saves all the information in a .json file, you help me port this if neceassry.

Fyi, I'm heavily invested in Nagios and Elasticsearch and it's on my to do to add the Nagios Core, Elasticsearch, Logstash and Kibana versions too one day.

I should start working with a dev branch by the way, but I've never done that so I'm not sure how to start. Using a dev branch and syncing it every x time to the master branch would help prevent issue like you had this week. I'm a 'bit too busy' though atm to get started with this...

@ThomDietrich
Copy link
Member Author

ThomDietrich commented May 10, 2017

Hey,
sure thing! I totally get your point. With this confirmation I'll look into this hopefully soon.

Nagios is also part of my setup (although not on the systems I'm using FireMotD on) and I've worked with the ELK stack for quite some time (not anymore). Both would be great additions.

Development: You could follow methods such as git flow but honestly I think it's too heavy for the FireMotD project. You could leave out the develop branch though and work with lightweight feature-branches and GitHubs PR feature. That's how a bunch of projects I'm contributing in are organized.
Here's what I'd suggest: Whoever wants to contribute something creates a PR (including you). Other interested developers can then review this PR. If no problems arise it can be merged. @dimon222 and myself are probably good candidates to mention for review.

Regarding the json: Could you elaborate? You want to generate all information upfront (e.g. via cron) and only show it upon login?

@willemdh
Copy link
Member

willemdh commented May 11, 2017

Regarding the json: Could you elaborate? You want to generate all information upfront (e.g. via cron) and only show it upon login?

Correct, this has been on my to do for quite some time. Instead of using /var/tmp/updatecount.txt i would like to write to a .json file which contains all the info. On logon, only uptime, cpu usage, cpu load, memory, swap and disk usage, sessions and processes would have to be generated. The other info would be generated once a day with cron.

The big question is if and when I'll have time for this of course...

About the git flow options, I'll think about it and experiment with the pr's a bit. Again when I find some spare time, not making any promises.. :)

@willemdh
Copy link
Member

@ThomDietrich The new JSON configuration file should allow you to easily add custom checks which could even require sudo permissions.

@ThomDietrich
Copy link
Member Author

Amazing!
I'm still willing to do these additions and with the new config this might become easier 👍
This will take me a few more weeks to look into...

@willemdh
Copy link
Member

@ThomDietrich I made an example with Elasticsearch version.

  1. Add your custom addtion to FireMotD.json in FireMotD
  2. Create Explore function
  3. Regenerate FireMotD.json
  4. Add conditionals to theme functions

Feel free to comment if you have any ideas making it easier

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

No branches or pull requests

2 participants