{"id":1769,"date":"2013-01-22T09:02:55","date_gmt":"2013-01-22T00:02:55","guid":{"rendered":"http:\/\/www.techscore.com\/blog\/?p=1769"},"modified":"2018-11-14T16:33:57","modified_gmt":"2018-11-14T07:33:57","slug":"cucumber-nagios-%e3%81%a7%e7%9b%a3%e8%a6%96%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/www.techscore.com\/blog\/2013\/01\/22\/cucumber-nagios-%e3%81%a7%e7%9b%a3%e8%a6%96%e3%81%99%e3%82%8b\/","title":{"rendered":"cucumber-nagios \u3067\u76e3\u8996\u3059\u308b"},"content":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\u3001\u9234\u6728\u3067\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<p><a title=\"cucumber-nagios\" href=\"http:\/\/auxesis.github.com\/cucumber-nagios\/\">cucumber-nagios<\/a> \u3068\u3044\u3046\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u6c17\u306b\u306a\u3063\u3066\u3044\u305f\u306e\u3067\u3001\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>cucumber-nagios \u3092\u4f7f\u7528\u3059\u308b\u3068\u3001<a title=\"cucumber\" href=\"http:\/\/cukes.info\/\">Cucumber<\/a> \u3067\u306e\u30c6\u30b9\u30c8\u7d50\u679c\u3092 <a title=\"Nagios\" href=\"http:\/\/www.nagios.org\/\">Nagios<\/a> \u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u51fa\u529b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u5358\u306a\u308b\u758e\u901a\u78ba\u8a8d\u3067\u306f\u306a\u304f\u3001\u300c\u30e6\u30fc\u30b6\u64cd\u4f5c\u3092\u60f3\u5b9a\u3057\u305f\u30b7\u30ca\u30ea\u30aa\u304c\u5b9f\u884c\u3067\u304d\u308b\u3053\u3068\uff08Cucumber \u306e\u30c6\u30b9\u30c8\u304c\u901a\u308b\u3053\u3068\uff09\u300d\u3092 Nagios \u3067\u76e3\u8996\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6642\u306b\u767a\u751f\u3057\u305f\u554f\u984c<\/h2>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6642\u306b\u3044\u304f\u3064\u304b\u554f\u984c\u304c\u767a\u751f\u3057\u3001\u8a66\u884c\u932f\u8aa4\u3092\u884c\u3044\u307e\u3057\u305f\u306e\u3067\u3001\u5148\u306b\u307e\u3068\u3081\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<ul>\n<li>Ruby1.9 \u3067\u306f bundler \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u5408\u308f\u305a\u306b\u52d5\u4f5c\u3057\u306a\u304b\u3063\u305f<br \/>\ncucumber-nagios \u304c\u4f9d\u5b58\u3059\u308b bundler \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u53e4\u304b\u3063\u305f\u305f\u3081\u3001Ruby1.9 \u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u305f bundler \u3068\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u5408\u308f\u305a\u3001\u300cbundle install\u300d\u3059\u308b\u3068\u304d\u306b\u30a8\u30e9\u30fc\u3068\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002bundler \u3092\u53e4\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u5dee\u3057\u66ff\u3048\u308c\u3070\u52d5\u304b\u3059\u3053\u3068\u306f\u3067\u304d\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u540c\u3058\u30de\u30b7\u30f3\u306e\u4ed6\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u5f71\u97ff\u304c\u3042\u308b\u304b\u3082\u3057\u308c\u306a\u3044\u305f\u3081\u3001\u4eca\u56de\u306f Ruby1.8 \u306e\u74b0\u5883\u3067\u8a66\u3057\u307e\u3057\u305f\u3002<\/li>\n<li>cucumber-nagios-0.9.2 \u306f cucumber-1.2.1 \u3067\u306f\u52d5\u4f5c\u3057\u306a\u3044<br \/>\ncucumber-1.1.9 \u3092\u660e\u793a\u7684\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u306a\u304a\u3057\u307e\u3057\u305f\u3002<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2>cucumber-nagios \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>\u4e0a\u8a18\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6642\u306b\u767a\u751f\u3057\u305f\u554f\u984c\u3092\u8e0f\u307e\u3048\u3066\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u3001Ruby1.8 \u306b\u5207\u308a\u66ff\u3048\u307e\u3059\u3002<\/p>\n<p>rvm \u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u66f4\u3057\u307e\u3059\uff08\u3053\u3046\u3044\u3046\u5834\u5408\u306b rvm \u306a\u3069\u306e\u30c4\u30fc\u30eb\u3092\u5229\u7528\u3057\u3066\u3044\u308b\u3068\u4fbf\u5229\u3067\u3059\u306d\uff09\u3002<\/p>\n<pre class=\"lang:sh decode:true\"># \u30d0\u30fc\u30b8\u30e7\u30f3\u306f\u304a\u624b\u5143\u306e\u74b0\u5883\u306b\u5408\u308f\u305b\u3066\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044.\r\nrvm use ruby-1.8.7-p371<\/pre>\n<p>cucumber \u3068 cucumber-nagios \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\"># cucumber-1.2.x \u3067\u306f\u52d5\u4f5c\u3057\u306a\u3044\u305f\u3081\u3001\u5148\u306b cucumber-1.1.9 \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059.\r\ngem install cucumber -v=1.1.9\r\n\r\n# \u73fe\u6642\u70b9\u306e cucumber-nagios \u306e\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059.\r\ngem install cucumber-nagios -v=0.9.2<\/pre>\n<p>\u300c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6642\u306b\u767a\u751f\u3057\u305f\u554f\u984c\u300d\u3067\u8ff0\u3079\u307e\u3057\u305f\u304c\u3001\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u7d44\u307f\u308f\u305b\u306b\u3088\u3063\u3066\u306f\u52d5\u4f5c\u3057\u306a\u3044\u306e\u3067\u3001\u4e0a\u8a18\u306e\u3088\u3046\u306b\u660e\u793a\u7684\u306b\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u6307\u5b9a\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<p>\u203bcucumber-nagios \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u4e0a\u304c\u3063\u305f\u5834\u5408\u306f\u3001\u6539\u3081\u3066 cucumber \u3068 cucumber-nagios \u306e\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u540c\u58eb\u306e\u7d44\u307f\u5408\u308f\u305b\u3067\u52d5\u4f5c\u3059\u308b\u304b\u78ba\u8a8d\u3057\u305f\u307b\u3046\u304c\u826f\u3044\u3067\u3059\u3002<\/p>\n<p>\u3053\u3053\u307e\u3067\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u5b8c\u4e86\u3067\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u4f5c\u6210<\/h2>\n<p>cucumber-nagios \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3068\u3001cucumber-nagios-gen \u3068\u3044\u3046\u30b3\u30de\u30f3\u30c9\u304c\u4f7f\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>cucumber-nagios-gen \u306e\u4f7f\u3044\u65b9\u306f\u3001\u5927\u304d\u304f\u5206\u3051\u3066 2 \u901a\u308a\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u4e00\u3064\u306f\u72ec\u7acb\u3057\u305f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3059\u308b\u6a5f\u80fd\u3067\u3001\u65e2\u5b58\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3068\u306f\u5207\u308a\u96e2\u3057\u305f\u3044\u5834\u5408\u306b\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<p>\u3082\u3046\u3072\u3068\u3064\u306f\u30c6\u30b9\u30c8\u30b1\u30fc\u30b9 (feature) \u3092\u4f5c\u6210\u3059\u308b\u6a5f\u80fd\u3067\u3001\u65e2\u5b58\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u30c6\u30b9\u30c8\u30b3\u30fc\u30c9\u3060\u3051\u8ffd\u52a0\u3057\u305f\u3044\u5834\u5408\u306b\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<p>\u305d\u308c\u305e\u308c\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30b3\u30de\u30f3\u30c9\u306e 1 \u3064\u76ee\u306e\u5f15\u6570\u3067\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:sh decode:true\"># \u30b9\u30bf\u30f3\u30c9\u30a2\u30ed\u30f3\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3059\u308b\u5834\u5408.\r\ncucumber-nagios-gen project ...\r\n\r\n# \u65e2\u5b58\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u30c6\u30b9\u30c8\u30b1\u30fc\u30b9 (feature) \u3092\u4f5c\u6210\u3059\u308b\u5834\u5408.\r\ncucumber-nagios-gen feature ...<\/pre>\n<p>\u4eca\u56de\u306f\u72ec\u7acb\u3057\u305f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3068\u3057\u3066\u4f5c\u6210\u3057\u307e\u3059\uff08\u76e3\u8996\u7528\u30b5\u30fc\u30d0\u306b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u30c7\u30d7\u30ed\u30a4\u3057\u306a\u3044\u5834\u5408\u304c\u591a\u3044\u306f\u305a\u306a\u306e\u3067\uff09\u3002<\/p>\n<p>\u76e3\u8996\u5bfe\u8c61\u306f\u4f55\u3067\u3082\u826f\u3044\u306e\u3067\u3059\u304c\u3001Techscore \u3092\u76e3\u8996\u3059\u308b\u305f\u3081\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:sh decode:true\">cucumber-nagios-gen project www.techscore.com<\/pre>\n<p>www.techscore.com \u3068\u3044\u3046\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u3001\u305d\u306e\u4e2d\u306b\u79fb\u52d5\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:sh decode:true\">cd www.techscore.com<\/pre>\n<p>\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"lang:sh decode:true\">&gt; ls\r\nGemfile  README  features<\/pre>\n<p>\u672c\u6765\u306f\u3053\u3053\u3067\u300cbundle install\u300d\u3057\u305f\u3044\u3068\u3053\u308d\u3067\u3059\u304c\u3001\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u7d44\u307f\u5408\u308f\u305b\u306e\u554f\u984c\u304c\u3042\u308b\u306e\u3067\u3001Gemfile \u3092\u4ee5\u4e0b\u306e\u5185\u5bb9\u306b\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:ruby decode:true\">source :rubygems\r\n\r\ngem 'cucumber', '~&gt; 1.1.9'\r\ngem 'cucumber-nagios', '~&gt; 0.9.2'<\/pre>\n<p>\u305d\u308c\u3067\u306f\u300cbundle install\u300d\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:sh decode:true\">bundle install<\/pre>\n<p>\u6b21\u306b\u3001\u30c6\u30b9\u30c8\u30b1\u30fc\u30b9\uff08feature\uff09\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p>\u524d\u8ff0\u3057\u305f\u300ccucumber-nagios-gen feature ...\u300d\u3067\u751f\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:sh decode:true\">&gt; cucumber-nagios-gen feature www.techscore.com techscore\r\nGenerating with feature generator:\r\n\u00a0\u00a0\u00a0\u00a0 [ADDED]\u00a0 features\/www.techscore.com\/techscore.feature\r\n\u00a0\u00a0\u00a0\u00a0 [ADDED]\u00a0 features\/www.techscore.com\/steps\/techscore_steps.rb<\/pre>\n<p>features\/techscore.com\/techscore.feature \u3092\u958b\u304f\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u66f8\u304b\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">Feature: www.techscore.com\r\n  It should be up\r\n\r\n  Scenario: Visiting home page\r\n    When I go to \"http:\/\/www.techscore.com\"\r\n    Then the request should succeed<\/pre>\n<p>\u81ea\u52d5\u751f\u6210\u3055\u308c\u305f\u3082\u306e\u3067\u3059\u304c\u3001\u300chttp:\/\/www.techscore.com \u3078\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u304c\u6210\u529f\u3059\u308b\u3053\u3068\u300d\u306e\u30c6\u30b9\u30c8\u3067\u3059\u3002<\/p>\n<p>\u30c6\u30b9\u30c8\u3092\u5b9f\u884c\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"lang:sh decode:true\">&gt; cucumber-nagios features\/www.techscore.com\/techscore.feature\r\nCUCUMBER OK - Critical: 0, Warning: 0, 2 okay | passed=2; failed=0; nosteps=0; total=2; time=0<\/pre>\n<p>Techscore \u304c\u30c0\u30a6\u30f3\u3057\u3066\u3044\u306a\u3051\u308c\u3070\u3001\u4e0a\u8a18\u306e\u3088\u3046\u306b\u300cCUCUMBER OK ...\u300d\u3068\u3044\u3046\u51fa\u529b\u304c\u5f97\u3089\u308c\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n<p>\u3053\u308c\u3067 Cucumber \u3067\u306e\u30c6\u30b9\u30c8\u7d50\u679c\u3092 Nagios \u3067\u76e3\u8996\u3067\u304d\u307e\u3059\u306d\u3002<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\u3001\u9234\u6728\u3067\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>cucumber-nagios \u3068\u3044\u3046\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u6c17\u306b\u306a\u3063\u3066\u3044\u305f\u306e\u3067\u3001\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\u3002<br \/><a href=\"https:\/\/www.techscore.com\/blog\/2013\/01\/22\/cucumber-nagios-%e3%81%a7%e7%9b%a3%e8%a6%96%e3%81%99%e3%82%8b\/\">\u7d9a\u304d\u3092\u8aad\u3080...<\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[18],"tags":[22,70,83],"_links":{"self":[{"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/posts\/1769"}],"collection":[{"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/comments?post=1769"}],"version-history":[{"count":1,"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/posts\/1769\/revisions"}],"predecessor-version":[{"id":17973,"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/posts\/1769\/revisions\/17973"}],"wp:attachment":[{"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/media?parent=1769"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/categories?post=1769"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techscore.com\/blog\/wp-json\/wp\/v2\/tags?post=1769"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}