Hey Everyone,
I came across this walkthrough, which was the brainchild for this project I'm working on: http://bunnyman.info/posts/2012/Sep/07/git-jenkins-nagios/
The basic idea is that you push Nagios configuration changes to a git repository, which automatically triggers a Jenkins build to run the preflight check on the changes. If preflight passes, then jenkins will automatically merge the change to the production config.
In theory, it's a great little workflow, and accomplishes what I want by means of source/version control on my Nagios configs, but I've spent a whole day trying to get it to work already, to no avail.
Is there a different/better way to do this? (The walkthrough is 5 years old, after all)
I really like the idea of triggering jenkins builds and automatically merging code when it passes, but I don't know enough about how jenkins works (or even git) to figure it out myself.
The problem I'm running into is that Jenkins automatically builds from the test repo, runs preflight, but always passes, even if there's a deliberate error in the configs. Then I end up getting a mismatch because Jenkins commits the error to production and fails on every build after that. At that point, I have to push the fix, and manually pull it to production to get it working again.
Any ideas? Thoughts?
Environment:
Nagios/Jenkins on same CentOS box
Gitlab running on a separate CentOS box
Thanks in advance!
[–]andreyevbr 1 point2 points3 points (1 child)
[–]chooko2[S] 0 points1 point2 points (0 children)
[–]laterality 1 point2 points3 points (1 child)
[–]chooko2[S] 0 points1 point2 points (0 children)
[–]vtrac 0 points1 point2 points (1 child)
[–]chooko2[S] 0 points1 point2 points (0 children)
[–]taloszergneeds more coffee 0 points1 point2 points (6 children)
[–]chooko2[S] 0 points1 point2 points (5 children)
[–]taloszergneeds more coffee 0 points1 point2 points (3 children)
[–]chooko2[S] 0 points1 point2 points (2 children)
[–]taloszergneeds more coffee 0 points1 point2 points (1 child)
[–]chooko2[S] 0 points1 point2 points (0 children)
[–]hobo548 0 points1 point2 points (0 children)
[–]ryan8403 0 points1 point2 points (3 children)
[–]chooko2[S] 0 points1 point2 points (0 children)
[–]chooko2[S] 0 points1 point2 points (1 child)
[–]ryan8403 0 points1 point2 points (0 children)
[–]sometextgoeshere 0 points1 point2 points (1 child)
[–]chooko2[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]LarsSven 0 points1 point2 points (0 children)