Comments (5)
NB: in case it doesn't, more foo can be added 😆
from icinga2-diagnostics.
@widhalmt: I disagree, having a GIT working directory is the best what could happen to you when you want to figure out the installed version. Please use at least something like git describe
, or some shell voodoo like this:
grep -q ^ref: .git/HEAD && cat .git/$(grep ^ref: .git/HEAD | cut -d ' ' -f 2)
Whether a working directory is dirty (check porcelain, git status) might be very interesting to know. There is absolutely no better place for all this diagnose work than ... well, I have to repeat myself, a cloned GIT repository :-)
from icinga2-diagnostics.
Ok, then. Thank you for your insights. I was unsure about that but I had to decide for a way to go. To say it with the crusader from Indiana Jones: My choice was bad.
Thanks a lot. I'll add this to the script.
from icinga2-diagnostics.
Just to add a bit of information: The Script already fetched the git commit that was used when it found a .git directory. Of course, your shell-fu is mightier than mine so it was just a print of the latest git log
entry.
Nonetheless I wanted to have this appear in the anomalies section because I saw many users use a git clone without caring if they got a release or just random commit. So I wanted to do both:
- Show if we are running a Director release or just some random commit
- Make the supporter aware that there is a git clone in use which might be changed every time.
My assumption was, if someone used a release archive for installation they are likely to do so in the future. If someone uses a git clone with a release it could mean that they checked out a release on purpose or by accident. If the latter ist the case they would do a git pull
sometimes and that is what I wanted to make the reader of the output aware of.
Maybe it would be a good idea to check if the used checkout is the freshest commit available in the clone?
from icinga2-diagnostics.
Above short snippet should be most of this I guess. Check out a specific tag and try, checkout master - and try again.
from icinga2-diagnostics.
Related Issues (20)
- Check for stale api log
- Avoid "find /..." without excludes
- Show Hosts and Services in "conf.d" as anomaly
- Report mixed configuration of Director and DSL as anomaly
- Check intervals with dependencies HOT 1
- Check for open file descriptors HOT 4
- check for openssl version HOT 1
- Illegal number HOT 1
- Bug at Line 588? HOT 1
- Detect Zone in Zone sync HOT 2
- Check for inofficial patches
- Make OS detection work with Python 3 HOT 1
- Make virtualization detection more reliable in Python
- Provide alternative outputs
- Determine package versions with Python HOT 2
- Syntax error: redirection unexpected HOT 5
- Calculate "checks per second"
- Loglines per hour HOT 1
- Check for unusual high rate of log lines
- Check for log_duration 0 on agents
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from icinga2-diagnostics.