icinga2
icinga2 copied to clipboard
docker desktop for windows?
This has some issues on windows desktop docker. Mysql fails because of the Volumes, I have try to re-map them to new ones but without any luck. Any pointers for this? Also wanted to say this works great on a non windows machine. Keep up the good work!
Why do you want to do this? What do you want to achieve? A pain in the ass? I can't speak from my own experience, but I'm pretty sure there are more effective ways to achieve that :rofl:
Hi @joshkish
It worked on the previous version of Docker for Windows, but I have not been able to test it recently after the switch to Microsoft's own virtualization platform. Something with that update broke Windows badly for me and I gave up 😢 Is there a specific error you get? Maybe something in the mysql logs? I'm wondering if it's a permission issue? Have you tried using an external mysql instance?
Yes the external sql server works but this box needs to be remote and they are only wanting windows machines inside the network. Cant get to the mysql logs as the container fails to start. Ill stick it on cent os and they will have to deal. Thanks for the feedback.
[cid:[email protected]]
Joshua Kish | Systems Engineer D. 913.551.0250 | P. 913.957.0306 | [email protected] 4780 NW 41st St., Suite 500 | Riverside MO | www.velociti.comhttp://www.velociti.com
[cid:[email protected]]https://www.linkedin.com/company/velociti-inc-?trk=top_nav_home [cid:[email protected]] https://twitter.com/VelocitiInc [cid:[email protected]] http://www.facebook.com/velocitiinc [cid:[email protected]] http://www.velociti.com/feed [cid:[email protected]] http://www.youtube.com/VelocitiKC
From: Jordan Jethwa [email protected] Sent: Thursday, July 18, 2019 1:30 PM To: jjethwa/icinga2 [email protected] Cc: Josh Kish [email protected]; Mention [email protected] Subject: Re: [jjethwa/icinga2] docker desktop for windows? (#191)
Hi @joshkishhttps://github.com/joshkish
It worked on the previous version of Docker for Windows, but I have not been able to test it recently after the switch to Microsoft's own virtualization platform. Something with that update broke Windows badly for me and I gave up 😢 Is there a specific error you get? Maybe something in the mysql logs? I'm wondering if it's a permission issue? Have you tried using an external mysql instance?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/jjethwa/icinga2/issues/191?email_source=notifications&email_token=ALZ4JUT3WQHV4INFBVVQOEDQACZA3A5CNFSM4IE3NNEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2JL6TQ#issuecomment-512933710, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ALZ4JUUF7UVQJOUTFJCKZJDQACZA3ANCNFSM4IE3NNEA.
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
@joshkish
You could try making /var/logs/mysql a volume so the logs get written out to it before the container dies, but personally I think your idea of forcing CentOS, CoreOS, etc is better (no reboots because Windows updated), BSODs, etc 😛
If you want to get the container logs, just create the container and do not remove it. Afterwards you can call docker logs <containername>
and get the log output.
And when docker-compose automatically restarts your container, just change the restart
flag to never. That's it. Or call docker logs --follow <containername>
and you'll get the output of every container start.
- Max Can you add the log files.
[cid:[email protected]]
Joshua Kish | Systems Engineer D. 913.551.0250 | P. 913.957.0306 | [email protected] 4780 NW 41st St., Suite 500 | Riverside MO | www.velociti.comhttp://www.velociti.com
[cid:[email protected]]https://www.linkedin.com/company/velociti-inc-?trk=top_nav_home [cid:[email protected]] https://twitter.com/VelocitiInc [cid:[email protected]] http://www.facebook.com/velocitiinc [cid:[email protected]] http://www.velociti.com/feed [cid:[email protected]] http://www.youtube.com/VelocitiKC
From: Benedikt Heine [email protected] Sent: Thursday, July 18, 2019 2:05 PM To: jjethwa/icinga2 [email protected] Cc: Josh Kish [email protected]; Mention [email protected] Subject: Re: [jjethwa/icinga2] docker desktop for windows? (#191)
If you want to get the container logs, just create the container and do not remove it. Afterwards you can call docker logs
And when docker-compose automatically restarts your container, just change the restart flag to never. That's it. Or call docker logs --follow
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/jjethwa/icinga2/issues/191?email_source=notifications&email_token=ALZ4JUXJVVHQHDADG2ET6O3QAC5FNA5CNFSM4IE3NNEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2JPB7A#issuecomment-512946428, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ALZ4JUVHZ3ENV3WXNUAEUXDQAC5FNANCNFSM4IE3NNEA.
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
So we’ve tried different variations of volume mapping to get the Mariadb to come up with no luck. The only time Icinga2 will come up is when we map no volumes to windows, but then we cannot shell into the container.
Thanks,
[http://www.velociti.com/content/media/Velociti2017Logo_web_200-e1496697914490.png]
Max McConnell | Systems Engineer M. 816.965.7331 | D. 913.217.3033 | [email protected]mailto:[email protected] 4780 NW 41st St., Suite 500 | Riverside MO | www.velociti.comhttp://www.velociti.com/
[http://www.velociti.com/content/media/linkedIn.png]https://www.linkedin.com/company/velociti-inc-?trk=top_nav_home [http://www.velociti.com/content/media/twitter.png] https://twitter.com/VelocitiInc [http://www.velociti.com/content/media/facebook.png] http://www.facebook.com/velocitiinc [http://www.velociti.com/content/media/RS.png] http://www.velociti.com/feed [http://www.velociti.com/content/media/YouTube.png] http://www.youtube.com/VelocitiKC
From: Josh Kish Sent: Thursday, July 18, 2019 2:19 PM To: jjethwa/icinga2 [email protected]; jjethwa/icinga2 [email protected] Cc: Mention [email protected]; Max McConnell [email protected] Subject: RE: [jjethwa/icinga2] docker desktop for windows? (#191)
- Max Can you add the log files.
[cid:[email protected]]
Joshua Kish | Systems Engineer D. 913.551.0250 | P. 913.957.0306 | [email protected]mailto:[email protected] 4780 NW 41st St., Suite 500 | Riverside MO | www.velociti.comhttp://www.velociti.com
[cid:[email protected]]https://www.linkedin.com/company/velociti-inc-?trk=top_nav_home [cid:[email protected]] https://twitter.com/VelocitiInc [cid:[email protected]] http://www.facebook.com/velocitiinc [cid:[email protected]] http://www.velociti.com/feed [cid:[email protected]] http://www.youtube.com/VelocitiKC
From: Benedikt Heine <[email protected]mailto:[email protected]> Sent: Thursday, July 18, 2019 2:05 PM To: jjethwa/icinga2 <[email protected]mailto:[email protected]> Cc: Josh Kish <[email protected]mailto:[email protected]>; Mention <[email protected]mailto:[email protected]> Subject: Re: [jjethwa/icinga2] docker desktop for windows? (#191)
If you want to get the container logs, just create the container and do not remove it. Afterwards you can call docker logs
And when docker-compose automatically restarts your container, just change the restart flag to never. That's it. Or call docker logs --follow
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/jjethwa/icinga2/issues/191?email_source=notifications&email_token=ALZ4JUXJVVHQHDADG2ET6O3QAC5FNA5CNFSM4IE3NNEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2JPB7A#issuecomment-512946428, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ALZ4JUVHZ3ENV3WXNUAEUXDQAC5FNANCNFSM4IE3NNEA.
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
@joshkish
That's really weird behaviour. When you shell, is it using docker exec? I really think it's something with the way Windows is setting permissions when you use a volume.
Yes we used docker exec
[cid:[email protected]]
Joshua Kish | Systems Engineer D. 913.551.0250 | P. 913.957.0306 | [email protected] 4780 NW 41st St., Suite 500 | Riverside MO | www.velociti.comhttp://www.velociti.com
[cid:[email protected]]https://www.linkedin.com/company/velociti-inc-?trk=top_nav_home [cid:[email protected]] https://twitter.com/VelocitiInc [cid:[email protected]] http://www.facebook.com/velocitiinc [cid:[email protected]] http://www.velociti.com/feed [cid:[email protected]] http://www.youtube.com/VelocitiKC
From: Jordan Jethwa [email protected] Sent: Thursday, July 18, 2019 2:47 PM To: jjethwa/icinga2 [email protected] Cc: Josh Kish [email protected]; Mention [email protected] Subject: Re: [jjethwa/icinga2] docker desktop for windows? (#191)
@joshkishhttps://github.com/joshkish
That's really weird behaviour. When you shell, is it using docker exec? I really think it's something with the way Windows is setting permissions when you use a volume.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/jjethwa/icinga2/issues/191?email_source=notifications&email_token=ALZ4JUWWRDNFXH22UX63IE3QADCCPA5CNFSM4IE3NNEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2JSPTY#issuecomment-512960463, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ALZ4JUVSV6SEMBR4QV5RFKLQADCCPANCNFSM4IE3NNEA.
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hmm, I'll try to do a fresh install of Windows again tonight and see if I can get docker working. So bizarre
any luck yet, jjethwa?
Hi @Maxwell-Mc
Sorry, I tried a clean install and a full install and I guess there's something the (Win10) update does not like about my hardware 😞 Unfortunately, I will be away starting Saturday until the end of August with little to no access to the internet due to the remote location.
Any luck convincing your team to use a Linux variant like CoreOS in the meantime?
We got an instances running on vmware that seems to be stable. we need widows for a certain piece of software unfortunately, otherwise we would without a doubt be going with some linux distro. I myself have been working with the docker for windows with some success. I've got the icinga up and running, but everytime the container restarts I have to manually deploy the configs from director. So I'm still scratching my head on that one.
Are you using a volume for /etc/icinga2 or /etc/icinga2/conf.d?
/host_mnt/c/Dockertest/data/icinga/etc/icinga2:/etc/icinga2
I'm using volumes like the one above to match all the volumes in your original, and I can see them in the windows file system, but when I try to edit some of them they are garbage text.
K, so that means the configs should be active on that host. Director might show that they're not yet deployed, but you should see your specific configs (like a specific Check command) active. Director works in a slightly different way by deploying configs to a different directory structure meant for working with clusters.
The garbage text might be because of file format differences between Linux and Windows?
we like the director web GUI. is there a way to issue a deploy from CLI? Then we could maybe create a script in the compose to run on successful restart.
Oh yeah, love Director as well, just was trying to explain that the configs should already be active as configs are loaded from /etc/icinga2 by default when Icinga2 starts
well I think when we configure a host check with Icinga, the configs go to a special config file im not aware of. And yes when the container is restarted the host is still configured along with the template, but the host needs deployed again, which means Icinga isn't running checks on it until I deploy it again.
Yep, the Director configs get written out to /var/lib/icinga2/api
I don't know how to automate the deployment offhand, but there is a CLI: https://icinga.com/docs/director/latest/doc/60-CLI/
and API: https://icinga.com/docs/director/latest/doc/70-REST-API/
this is what i get when I restart the container
Error
Host not found
#0 /usr/share/php/Icinga/Exception/IcingaException.php(41): ReflectionClass->newInstanceArgs(Array) #1 /usr/share/php/Icinga/Web/Controller.php(87): Icinga\Exception\IcingaException::create(Array) #2 /usr/share/icingaweb2/modules/monitoring/application/controllers/HostController.php(33): Icinga\Web\Controller->httpNotFound(String) #3 /usr/share/php/Icinga/Web/Controller/ActionController.php(152): Icinga\Module\Monitoring\Controllers\HostController->init() #4 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(59): Icinga\Web\Controller\ActionController->__construct(Object(Icinga\Web\Request), Object(Icinga\Web\Response), Array) #5 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response)) #6 /usr/share/php/Icinga/Application/Web.php(300): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response)) #7 /usr/share/php/Icinga/Application/webrouter.php(104): Icinga\Application\Web->dispatch() #8 /usr/share/icingaweb2/public/index.php(4): require_once(String) #9 {main}
Ah! I bet that's because the container has a new ID (and possible hostname), so the original Host object that was created is no longer valid. You'll probably need to script something to massage the configs with the new container ID (or hostname)
object Host "lab_bench" { import "hoststest"
address = "25.76.164.99"
}
this is the host im attempting to monitor, not the windows host box itself. Icinga is able to keep the windows loopback IP up as a host because it wasn't created with director.
That Object is fine, but try checking to see if any other configs got generated under /etc/icinga2 or /var/lib/icinga2 that have references to the older container.
i can't find anything like that in the configs and it doesn't makes sense to me that it would be trying to reference on older container.
Hmm, it was just a guess since some configs are generated automatically. Do you get the same error when you run checkconfig?