LINUX.ORG.RU

История изменений

Исправление YAR, (текущая версия) :

Похоже, что нет - [F] (это ж оно?) только когда check_http отваливается по таймауту:

rain@walkbook:/tmp/1231231/usr/lib/nagios/plugins$ ./check_http -I 192.168.1.232 -u /text_sensor/fan_state -v
GET /text_sensor/fan_state HTTP/1.0
User-Agent: check_http/v2.3.1 (monitoring-plugins 2.3.1)
Connection: close


CRITICAL - Socket timeout after 10 seconds


root@walkbook:/home/rain# tcpdump -nvv -i eth0 host 192.168.1.232
tcpdump: listening on eth0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
13:19:58.746303 IP (tos 0x0, ttl 64, id 18646, offset 0, flags [DF], proto TCP (6), length 60)
    192.168.1.166.37224 > 192.168.1.232.80: Flags [S], cksum 0x850d (incorrect -> 0x6205), seq 3210983445, win 64240, options [mss 1460,sackOK,TS val 3484978496 ecr 0,nop,wscale 7], length 0
13:19:58.748422 IP (tos 0x0, ttl 255, id 27780, offset 0, flags [none], proto TCP (6), length 44)
    192.168.1.232.80 > 192.168.1.166.37224: Flags [S.], cksum 0xbcde (correct), seq 30553220, ack 3210983446, win 5840, options [mss 1460], length 0
13:19:58.748516 IP (tos 0x0, ttl 64, id 18647, offset 0, flags [DF], proto TCP (6), length 40)
    192.168.1.166.37224 > 192.168.1.232.80: Flags [.], cksum 0x84f9 (incorrect -> 0xf07a), seq 1, ack 1, win 64240, length 0
13:19:58.748732 IP (tos 0x0, ttl 64, id 18648, offset 0, flags [DF], proto TCP (6), length 156)
    192.168.1.166.37224 > 192.168.1.232.80: Flags [P.], cksum 0x856d (incorrect -> 0x48f4), seq 1:117, ack 1, win 64240, length 116: HTTP, length: 116
        GET /text_sensor/fan_state HTTP/1.0
        User-Agent: check_http/v2.3.1 (monitoring-plugins 2.3.1)
        Connection: close

13:19:58.757863 IP (tos 0x0, ttl 255, id 27781, offset 0, flags [none], proto TCP (6), length 218)
    192.168.1.232.80 > 192.168.1.166.37224: Flags [P.], cksum 0xa29b (correct), seq 1:179, ack 117, win 5724, length 178: HTTP, length: 178
        HTTP/1.0 200 OK
        Content-Length: 56
        Content-Type: application/json
        Access-Control-Allow-Origin: *
        Connection: close

        {"id":"text_sensor-fan_state","value":"OK","state":"OK"} [|http]
13:19:58.757940 IP (tos 0x0, ttl 64, id 18649, offset 0, flags [DF], proto TCP (6), length 40)
    192.168.1.166.37224 > 192.168.1.232.80: Flags [.], cksum 0x84f9 (incorrect -> 0xf006), seq 117, ack 179, win 64062, length 0

*** тут висим ***

13:20:08.747178 IP (tos 0x0, ttl 64, id 18650, offset 0, flags [DF], proto TCP (6), length 40)
    192.168.1.166.37224 > 192.168.1.232.80: Flags [F.], cksum 0x84f9 (incorrect -> 0xf005), seq 117, ack 179, win 64062, length 0
13:20:08.750219 IP (tos 0x0, ttl 255, id 27786, offset 0, flags [none], proto TCP (6), length 40)
    192.168.1.232.80 > 192.168.1.166.37224: Flags [F.], cksum 0xd3e8 (correct), seq 179, ack 118, win 5723, length 0
13:20:08.750302 IP (tos 0x0, ttl 64, id 18651, offset 0, flags [DF], proto TCP (6), length 40)
    192.168.1.166.37224 > 192.168.1.232.80: Flags [.], cksum 0x84f9 (incorrect -> 0xf004), seq 118, ack 180, win 64062, length 0
^C

Исходная версия YAR, :

Похоже, что нет - [F] (это ж оно) только когда check_http отваливается по таймауту:

rain@walkbook:/tmp/1231231/usr/lib/nagios/plugins$ ./check_http -I 192.168.1.232 -u /text_sensor/fan_state -v
GET /text_sensor/fan_state HTTP/1.0
User-Agent: check_http/v2.3.1 (monitoring-plugins 2.3.1)
Connection: close


CRITICAL - Socket timeout after 10 seconds


root@walkbook:/home/rain# tcpdump -nvv -i eth0 host 192.168.1.232
tcpdump: listening on eth0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
13:19:58.746303 IP (tos 0x0, ttl 64, id 18646, offset 0, flags [DF], proto TCP (6), length 60)
    192.168.1.166.37224 > 192.168.1.232.80: Flags [S], cksum 0x850d (incorrect -> 0x6205), seq 3210983445, win 64240, options [mss 1460,sackOK,TS val 3484978496 ecr 0,nop,wscale 7], length 0
13:19:58.748422 IP (tos 0x0, ttl 255, id 27780, offset 0, flags [none], proto TCP (6), length 44)
    192.168.1.232.80 > 192.168.1.166.37224: Flags [S.], cksum 0xbcde (correct), seq 30553220, ack 3210983446, win 5840, options [mss 1460], length 0
13:19:58.748516 IP (tos 0x0, ttl 64, id 18647, offset 0, flags [DF], proto TCP (6), length 40)
    192.168.1.166.37224 > 192.168.1.232.80: Flags [.], cksum 0x84f9 (incorrect -> 0xf07a), seq 1, ack 1, win 64240, length 0
13:19:58.748732 IP (tos 0x0, ttl 64, id 18648, offset 0, flags [DF], proto TCP (6), length 156)
    192.168.1.166.37224 > 192.168.1.232.80: Flags [P.], cksum 0x856d (incorrect -> 0x48f4), seq 1:117, ack 1, win 64240, length 116: HTTP, length: 116
        GET /text_sensor/fan_state HTTP/1.0
        User-Agent: check_http/v2.3.1 (monitoring-plugins 2.3.1)
        Connection: close

13:19:58.757863 IP (tos 0x0, ttl 255, id 27781, offset 0, flags [none], proto TCP (6), length 218)
    192.168.1.232.80 > 192.168.1.166.37224: Flags [P.], cksum 0xa29b (correct), seq 1:179, ack 117, win 5724, length 178: HTTP, length: 178
        HTTP/1.0 200 OK
        Content-Length: 56
        Content-Type: application/json
        Access-Control-Allow-Origin: *
        Connection: close

        {"id":"text_sensor-fan_state","value":"OK","state":"OK"} [|http]
13:19:58.757940 IP (tos 0x0, ttl 64, id 18649, offset 0, flags [DF], proto TCP (6), length 40)
    192.168.1.166.37224 > 192.168.1.232.80: Flags [.], cksum 0x84f9 (incorrect -> 0xf006), seq 117, ack 179, win 64062, length 0

*** тут висим ***

13:20:08.747178 IP (tos 0x0, ttl 64, id 18650, offset 0, flags [DF], proto TCP (6), length 40)
    192.168.1.166.37224 > 192.168.1.232.80: Flags [F.], cksum 0x84f9 (incorrect -> 0xf005), seq 117, ack 179, win 64062, length 0
13:20:08.750219 IP (tos 0x0, ttl 255, id 27786, offset 0, flags [none], proto TCP (6), length 40)
    192.168.1.232.80 > 192.168.1.166.37224: Flags [F.], cksum 0xd3e8 (correct), seq 179, ack 118, win 5723, length 0
13:20:08.750302 IP (tos 0x0, ttl 64, id 18651, offset 0, flags [DF], proto TCP (6), length 40)
    192.168.1.166.37224 > 192.168.1.232.80: Flags [.], cksum 0x84f9 (incorrect -> 0xf004), seq 118, ack 180, win 64062, length 0
^C