Network Monitoring Systems in Go?

polaris · · 869 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>Currently using Zabbix monitoring a virtual environment. Anything like Zabbix written in Go? My deal breaker is that it must support robust alerting like Zabbix does. Already looked at OpsDash but was hoping there are other alternatives. A big bonus if the alerts can exported either in CSV, JSON, or even XML.</p> <hr/>**评论:**<br/><br/>gogroob: <pre><p>Prometheus</p></pre>bbrazil: <pre><p>I&#39;m one of the Prometheus developers and it should support what you need. The alertmanager&#39;s generic webhook can send out alert notifications to any HTTP endpoint in JSON.</p> <p>I did a <a href="http://www.robustperception.io/audio-alerting-with-prometheus/">demo</a> of this a month back.</p></pre>lobster_johnson: <pre><p>We&#39;re using Prometheus.</p> <p>It&#39;s well-designed, completely solid despite not being 1.0, fast, doesn&#39;t use much memory, has decent I/O performance, has good APIs, has decent (if basic) integration with Grafana, and is super easy to get set up.</p> <p>Prometheus is a time series database as its core. It&#39;s similar to Zabbix (which we also used, way back, and very quickly tired of) in that its data model is based on a database of collected metrics that are monitored for trigger expressions. Unlike Zabbix, Prometheus does not have a management UI to modify its configuration; rather, it uses a rather simple YAML configuration file. It&#39;s also much simpler than Zabbix. It doesn&#39;t care about the topology of your data center; its data model is completely metric-oriented.</p> <p>The alerting system is simple, but functional. The core keeps track of pre-defined trigger expressions, which it can then emit to an external alerting system. We&#39;re using Prometheus&#39; own <code>alertmanager</code>; it supports email, PagerDuty, Slack and other mechanisms. The Github repo will warn you that the alert manager is not production-ready, but we&#39;ve been using it for a year or so with no hiccups whatsoever.</p> <p>The binary also contains a (very!) rudimentary web UI that can be used to inspect the state of the system and perform queries. Although it supports adding custom templates, it&#39;s not very good, and it&#39;s better to hook it up to something like Grafana. There&#39;s also PromDash, which I haven&#39;t tried out.</p></pre>gbrayut: <pre><p>Might want to check out <a href="http://Bosun.org" rel="nofollow">http://Bosun.org</a> which is written in go and backed by Opentsdb, graphite, or influxdb. It is not quite as mature as Prometheus but has a very powerful &#34;alert IDE&#34; experience.</p> <p>Check out my boss&#39;s presentation at Monitorama or his fundamentals video playlist at <a href="http://bosun.org/resources" rel="nofollow">http://bosun.org/resources</a> for more details.</p></pre>frankwiles: <pre><p>Consul.io has some simple, but neat monitoring abilities. </p></pre>lobster_johnson: <pre><p>Consul is a service discovery system, not a monitoring system.</p></pre>frankwiles: <pre><p>It&#39;s both <a href="https://www.consul.io/intro/getting-started/checks.html" rel="nofollow">https://www.consul.io/intro/getting-started/checks.html</a></p></pre>lobster_johnson: <pre><p>It&#39;s not. Consul&#39;s health checks exist to route requests to backends that are healthy (and, conversely, not route anything to backends that are down). It&#39;s not a general-purpose monitoring system.</p></pre>bbrazil: <pre><p>The problem with &#34;monitoring&#34; is that is has very different meanings depending on who you&#39;re talking to.</p> <p>One meaning is &#34;supervisor&#34;, that it when such a check fails it&#39;ll restart the process. Consul does not provide this.</p> <p>Another meaning is &#34;metrics&#34;. It is possible to pull the health data out and track it over time, but that&#39;s not part of Consul itself.</p> <p>What consul does have is an on-machine healthcheck for use in loadbalancing - in this case via service discovery. This is a handy way to avoid talking to servers that you can be pretty sure won&#39;t work, but you <a href="http://www.robustperception.io/healthchecking-is-not-transitive/" rel="nofollow">still need to send healthchecks from your clients to catch all the potential failure modes</a>.</p></pre>dacort: <pre><p>Take a look at Inspeqtor: <a href="http://contribsys.com/inspeqtor/" rel="nofollow">http://contribsys.com/inspeqtor/</a></p></pre>dAnjou: <pre><p>Why does it need to be written in Go? How is the programming language a tool is written in relevant for the job it&#39;s doing?</p></pre>TheMerovius: <pre><p>&#34;Written in go&#34; ⇒ &#34;single static binary with reasonable performance&#34;. &#34;Written in C&#34; ⇒ &#34;Probable security hole if it has network access&#34;. &#34;Written in ruby&#34; ⇒ &#34;Probably some dependency problems when updating, better get used to rvm&#34;. &#34;Written in Java/Skala/Clojure/…&#34; ⇒ &#34;Make sure you ship a JVM and have enough memory&#34;. &#34;Written in perl&#34; ⇒ &#34;Dear god, hopefully it does everything I want it to perfectly because I will never fix that mess&#34;.</p> <p>The language a software is written in is <em>hugely</em> important, especially if it&#39;s open source (because that more or less implies that you probably want to be able to change it).</p></pre>dAnjou: <pre><blockquote> <p>&#34;Written in go&#34; ⇒ &#34;<strong>single static binary</strong> with reasonable performance&#34;.</p> </blockquote> <p>Which you will have to compile yourself unless you&#39;re telling me that you&#39;re trusting some random people&#39;s builds. But let&#39;s assume you&#39;re not crazy and you&#39;re building it yourself. Well, then suddenly you&#39;ll be in the dependency mess that you&#39;re taunting Ruby with. Or is Go somehow immune to that?</p> <blockquote> <p>&#34;Written in C&#34; ⇒ &#34;Probable security hole if it has network access&#34;.</p> </blockquote> <p>Of course Go has like 0 flaws! And it has magic built-in that prevents every developer from shooting themselves in the foot.</p> <blockquote> <p>&#34;Written in ruby&#34; ⇒ &#34;Probably some dependency problems when updating, better get used to rvm&#34;.</p> </blockquote> <p>Not sure if you knew that but people in the Go community are desperately trying to come up with a dependency management solution that doesn&#39;t suck more those of other languages. Don&#39;t know if they got there yet or if they just went back to vendoring it all.</p> <blockquote> <p>&#34;Written in Java/Skala/Clojure/…&#34; ⇒ &#34;Make sure you ship a JVM and have enough memory&#34;.</p> </blockquote> <p>You&#39;re kidding right? The JVM is one <code>apt-get install</code> away and hardware is usually the least of your problems.</p> <blockquote> <p>&#34;Written in perl&#34; ⇒ &#34;Dear god, hopefully it does everything I want it to perfectly because I will never fix that mess&#34;.</p> </blockquote> <p>I guess I can agree with that one at least ... no, seriously, do you really think people will dive into the code of even only a moderately sized project just to debug a misbehaviour that they&#39;re observing? They either live with it and maybe wait for it to be fixed upstream or they switch products.</p></pre>TheMerovius: <pre><p>You grossly misunderstood my comment. It&#39;s purpose wasn&#39;t primarily to bash on other languages, but to illustrate how hugely important the language choice can be.</p> <p>But if you rather want to discuss the particular points I made:</p> <blockquote> <p>Which you will have to compile yourself unless you&#39;re telling me that you&#39;re trusting some random people&#39;s builds. </p> </blockquote> <p>I do indeed trust the developers builds (which I install from signed binary packages of my distribution). I don&#39;t use Gentoo and I don&#39;t live in the 90s. If I trust their code I can trust their binary just as well. No one audits all code they are installing beforehand. That&#39;s crazy talk.</p> <blockquote> <p>Of course Go has like 0 flaws!</p> </blockquote> <p>Never claimed that. You are putting words in my mouth.</p> <blockquote> <p>And it has magic built-in that prevents every developer from shooting themselves in the foot.</p> </blockquote> <p>It is mostly memory safe. Which C clearly isn&#39;t. If you think, that software written in C isn&#39;t a <em>huge</em> security risk, you have been living under a rock for at least 30 years. You <em>can</em> write secure C. It&#39;s just that nobody does (which, again, should be completely obvious by watching the security space).</p> <blockquote> <p>Not sure if you knew that but people in the Go community are desperately trying to come up with a dependency management solution that doesn&#39;t suck more those of other languages.</p> </blockquote> <p>You worry about build-time. I worry about run-time. If I install a go program it will run in 10 years just as well, probably longer. I can put it on network storage and every computer in my fleet can just use it. If I install a ruby program, it breaks. On every effing update.</p> <blockquote> <p>You&#39;re kidding right? The JVM is one apt-get install away and hardware is usually the least of your problems.</p> </blockquote> <p>But for large deployments it makes a serious difference.</p> <blockquote> <p>no, seriously, do you really think people will dive into the code of even only a moderately sized project just to debug a misbehaviour that they&#39;re observing?</p> </blockquote> <p>Yes. That&#39;s just common fucking sense. Why else would you run open source anyway? I work at a company where all third-party open source code is part of the repository and if something breaks in it, you fix it and include the fix in your commit. You then try to get your fix upstream. But <em>of course</em> people are fixing bugs and issues in their open source software, that&#39;s literally what it&#39;s made for.</p></pre>dAnjou: <pre><blockquote> <p>You grossly misunderstood my comment. <strong>It&#39;s purpose wasn&#39;t primarily to bash on other languages</strong>, but to illustrate how hugely important the language choice can be.</p> </blockquote> <p>But it certainly sounded like that.</p> <blockquote> <p>I do indeed trust the developers builds (which I install from signed binary packages of my distribution).</p> </blockquote> <p>Usually a package maintainer is building it then. And depending on your distribution that&#39;s not necessarily a developer of this project. But do you only use Go projects that made it into your preferred distro?</p> <blockquote> <blockquote> <p>Of course Go has like 0 flaws!</p> </blockquote> <p>Never claimed that. You are putting words in my mouth.</p> </blockquote> <p>I was being sarcastic. As for your other point, Go is very very young, that alone makes it immature. And with its growing popularity it&#39;s attracting a lot of people including those who don&#39;t really know what they&#39;re doing but still release software that is then used by other software and so on. Go is <strong>not</strong> more or less of a security risk than any other language.</p> <blockquote> <p>If I install a go program it will run in 10 years just as well, probably longer. [...] If I install a ruby program, it breaks. On every effing update.</p> </blockquote> <p>I admit the deployment of a Go program is almost a no-brainer (btw. I like Go very much myself for that reason). But lumping every Ruby program together like it&#39;s inherently the most shittiest thing in the world is just not fair to say (btw. I really really dislike Ruby for various reasons).</p> <blockquote> <p>Yes. That&#39;s just common fucking sense. Why else would you run open source anyway? [...]</p> </blockquote> <p>Using open source software and working on it (aka contributing) are two very different things. And I doubt that the majority of situations is like in your company. It&#39;s really cool that you&#39;re doing it like that, especially that you&#39;re given or taking time to do that! I appreciate it.</p></pre>TheMerovius: <pre><blockquote> <p>Go is not more or less of a security risk than any other language.</p> </blockquote> <p>It is <em>much</em> less of a security risk than C/C++ (so is <em>any</em> other memory safe language of course). Claiming otherwise is ignoring reality. There are classes of security bugs that are language independent. C/C++ have their own class and it&#39;s probably the majority of the exploits out there <em>by far</em> (I don&#39;t want to claim numbers, but the margin should be enormous).</p> <p>Again, to reiterate: If you think, that software written in C isn&#39;t a <em>huge</em> security risk, you have been living under a rock for at least 30 years.</p></pre>TheMerovius: <pre><p>Btw:</p> <blockquote> <p>But let&#39;s assume you&#39;re not crazy and you&#39;re building it yourself.</p> <p>The JVM is one <code>apt-get install</code> away</p> </blockquote> <p>Seriously?</p></pre>dAnjou: <pre><p>Trusting a random person&#39;s build is different from trusting a package that&#39;s gone through an established process of reviewing it by people that are actually known by the community surrounding it (i.e. not everyone can become a package maintainer and put their stuff in Debian).</p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

869 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传