host

nagios/passive_check

给你一囗甜甜゛ 提交于 2019-12-03 10:45:44
术语 被监控机(MC:Monitor Client) 监控机 (MS:Monitor Server) 被动模式工作原理: 在被 MC 上面,使用nagios-plugins提供的插件,得出监数据,将数据发送到 MS 端,MS上面运行的daemon(常见的是nsca,或 nrdp,mod_gearman )用来接收这些数据,按照预定义的格式传递给nagios,nagios核心进程将会对数据进行处理(前台展示,警报)。 nsca 插件采用的是将检测结果写入外部命令文件,该文件是一个管道文件,也是nagios主程序的一个接口(用来接收监控数据),(ubuntu14.04 nagios 默认配置是 “/var/lib/nagios3/rw/nagios.cmd”); nrdp 插件除了将检测结果写入外部命令文件,还可以将检测结果直接写入到Nagios内核的spool目录,(ubuntu14.04 nagios 默认配置是 “/var/lib/nagios3/spool/checkresults”); mod_gearman 使用事件代理模式,会将结果注入nagios结果环形缓冲区数据结构中,不会被FIFO的IO限制 原理图 优缺点 优点:相比与主动模式,被动模式能很大程度地降低nagios负载 缺点:当监控的主机规模进一步扩大,会被"外部命令文件"I/O局限所拖累,(事件代理模式除外)

浅谈Centos 7系统的Tomcat服务器

人盡茶涼 提交于 2019-12-03 10:24:32
一、tomcat的由来 名称由来:tomcat最初是由Sun的软件架构师詹姆斯 邓肯 戴维森开发的。后来他帮助将其变为开源项目,并由Sun贡献给Apache软件基金会。由于大部分开源项目O'Reilly都会出一本相关的书,并且将其封面设计成某个动物的素描,因此他希望将此项目以一个动物的名字命名。因为他希望这种动物能够自己照顾自己,最终,他将其命名为tomcat(公猫)。 1、Tomcat应用场景 Tomcat服务器是一个免费的开源web应用服务器,属于轻量级应用服务器,在中小型系统和并发用户不是很多的场合中被普遍使用,是开发和测试JSP程序的首选。一般来说,Tomcat虽然和apache或者Nginx这些web服务器一样,具有处理HTML页面的功能,然而由于其处理静态页面的能力远不如apache或者Nginx,所以Tomcat一般是作为一个servlet和JSP容器,单独运行在后端。 2、Tomcat所需的依赖软件 在安装Tomcat之前必须安装JDK,JDK是sun公司免费提供的Java语言的软件开发工具包,其中包含Java虚拟机(JVM)。编写好的Java源程序经过编译可形成Java字节码,只要安装了JDK就可以利用JVM解释这些字码文件,从而保证Java的跨平台性。 在平台兼容性方面,JDK作为解释字节码文件并据此调用操作系统的API实现对应功能的Java虚拟机

Tomcat: getHeader(“Host”) vs. getServerName()

匿名 (未验证) 提交于 2019-12-03 10:24:21
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've got a Tomcat app that is being served up from multiple domains. Previous developers built a method to return the application URL (see below). In the method they request the server name ( request.getServerName() ) which, appropriately, returns the ServerName from the httpd.conf file. However, I don't want that. What I want is the host name that the browser sent the request to, i.e. whichever domain the browser is accessing the application from. I tried getHeader("Host") , but that is still returning the ServerName set in the httpd.conf

Tomcat Virtual Host & Wildcard dns matching

匿名 (未验证) 提交于 2019-12-03 10:24:21
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have created an application which needs to accept wildcard dns and request to database using that wildcard value. I tried to simulate a virtual environment for myself to achieve what I want like this: 1) in my Linux OS I changed the /etc/hosts and add these lines : 127.0.0.1 test-domain.com 127.0.0.1 mehdi.test-domain.com 2) I changed my tomcat server.xml file as follows : <Host name="test-domain.com" appBase="webapps/ROOT" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> <Alias>www.test-domain.com<

Virtual Hosts on WAMP causing 403 forbidden on localhost… other aliases still work

匿名 (未验证) 提交于 2019-12-03 10:24:21
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I just realized that nothing else on WAMP is accessible unless it's under the virtual host alias. For example: if I name my vHost 'mysite.dev', I can only access mysite.dev and everything else gives a 403 forbidden error. If I add a vHost called anothersite.dev in addition to mysite.dev, only those sites can be accessed. The only thing under localhost that I can access is PHPMyAdmin. I have uncommented the line that includes vHosts.conf in the Apache httpd.conf file. This problem does not happen until I modify the vHosts.conf file.

C Compiler cannot create executables on SUA/Interix

匿名 (未验证) 提交于 2019-12-03 10:10:24
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Whenever I try to build an application with Interix's GCC on Windows, this is what happens: /tmp/grep-2.5.4-src/build$ ../configure --build=x86_64-pc-interix6 checking for a BSD-compatible install... /bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... ../install-sh -c -d checking for gawk... gawk checking whether make sets $(MAKE)... yes checking build system type... x86_64-pc-interix6 checking host system type... x86_64-pc-interix6 checking for gawk... (cached) gawk checking for gcc...

Unix command “host” - is there Windows equivalent?

…衆ロ難τιáo~ 提交于 2019-12-03 10:03:28
I am on a Windows 7 machine and I was instructed to use the Unix command "host" as per this article: https://devcenter.heroku.com/articles/custom-domains however, host is not a valid command with Windows and even with bash on Windows I could find host installed. Is there a Windows equivalent to "host"? This question is more suited to Super User , but the command you're looking for is nslookup . Both are (at their most basic) used to look up IP addresses for hostnames. You can run cmd and do nslookup hostname the same way you'd do host hostname . If you need something other than the IP address,

博客网站项目部署问题汇总

限于喜欢 提交于 2019-12-03 09:32:07
最近在使用koa2+mysql+nodejs+weback+vue+redis技术搭建了一个博客网站,奈何遇到了种种问题,现在一一总结一番: 问题1. 使用 ecosystem.json 配置文件部署项目, " post-deploy " : " npm install && pm2 startOrRestart ecosystem.json --env production " , // 项目发布到服务器上执行的命令 发现按照教程或者网络给出的配置文件,无法访问网站,网站报nginx代理问题,或者直接502 Bad Gateway ; 打印 pm2 的日志: 发现服务貌似一直被 killed 然后在唤起,然后在killed。。。。。 问题2.于是修改配置文件,怀疑是执行命令的问题: "post-deploy" : "npm install &&npm run prd &&pm2 startOrRestart ecosystem.json --env production", //项目发布到服务器上执行的命令 注意这里多了 npm run prd,对应的package.json 文件中的命令: "prd": "cross-env NODE_ENV=production pm2 start bin/www --watch", 即让服务启动的命令,然后页面就能访问了,但是会有几个问题:

How to add an external resources directory with jboss-cli?

匿名 (未验证) 提交于 2019-12-03 09:19:38
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I would like to add ${jboss.server.temp.dir}/foo_server/images_svg directory as external resources directory. For this I need to add the following line code into /subsystem/handlers <location name = "/images_svg" handler = "images" /> And into /subsystem/server name="default-server"/host name="default-host" <file name = "images" path = "${jboss.server.temp.dir}/foos_server/images_svg" directory-listing = "true" /> I expect something like this: <subsystem xmlns = "urn:jboss:domain:undertow:2.0" > <buffer-cache name = "default" />

RabbitMQ Client connect to several hosts

匿名 (未验证) 提交于 2019-12-03 09:18:39
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: The main goal to have several hosts of RabbiMQ servers ( clustering ) Are there any best practices to implement having several RabbitMQ hosts, and reconnect to the next one in case previous connection closed. Tutorial says that: A client can connect as normal to any node within a cluster. If that node should fail, and the rest of the cluster survives, then the client should notice the closed connection, and should be able to reconnect to some surviving member of the cluster. Generally, it's not advisable to bake in node hostnames or IP