Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想使用 Nagios perl 脚本,例如“check_http”。我想使用以下方法从中获取状态信息:
check_http -w 5 -c 10 -I 192.168.1.105
我不认为你这样做,你想做的是用你调用的 isUp() 方法编写你自己的 checkHTTP 类,而不是依赖为专门的嵌入式解释器编写的 Perl 脚本。
一定要通读 Perl 脚本的文本以了解所需的结构,但是 Java 项目不应该依赖于 Perl 脚本(直到集成团队掌握了它并必须让它与之交谈一些中间件;))
无论如何,这段代码中的导入语句不应该多于几个。