bashclub / checkmk-opnsense-agent

75 stars 18 forks source link

[solved] check of nginx broken? #51

Closed kohly closed 3 months ago

kohly commented 5 months ago

Hi,

After a reboot the plugin tells me that nginx is not started but it is and works correctly.

May you help me out of this?

BR kohly

NiclasPe commented 4 months ago

Same Problem here. Shows Upstream "no Data"

cpzengel commented 4 months ago

Access the Downstream by browser and check again later

NiclasPe commented 4 months ago

Unfortunately that doesn’t work. I have a working Upstream and Nginx Service.

Both are working normal and the Checks are failing since 29.06.2024

Bildschirmfoto 2024-07-24 um 12 58 00

cpzengel commented 4 months ago

I informed the developer

NiclasPe commented 4 months ago

@cpzengel

If done some research, the /vts path on the status socket works fine. Got it via curl --unix-socket /var/run/nginx_status.sock http://localhost/vts It also returns json data. Examape: loadMsec=1721820257000

{
    "hostName":"opnsense.test.de",
    "moduleVersion":"v0.2.1",
    "nginxVersion":"1.26.1",
    "loadMsec":1721820257000,
    "nowMsec":1721820744435,
    "connections":{
       "active":1,
       "reading":0,
       "writing":1,
       "waiting":0,
       "accepted":7,
       "handled":7,
       "requests":7
    },
    "sharedZones":{
       "name":"vhost_traffic_status",
       "maxSize":20971520,
       "usedSize":3516,
       "usedNode":1
    },
    "serverZones":{
       "_":{
          "requestCounter":6,
          "inBytes":501,
          "outBytes":1764,
          "responses":{
             "1xx":0,
             "2xx":0,
             "3xx":0,
             "4xx":6,
             "5xx":0,
             "miss":0,
             "bypass":0,
             "expired":0,
             "stale":0,
             "updating":0,
             "revalidated":0,
             "hit":0,
             "scarce":0
          },
          "requestMsecCounter":0,
          "requestMsec":0,
          "requestMsecs":{
             "times":[
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1721820329858,
                1721820338987,
                1721820344278,
                1721820345986,
                1721820367660,
                1721820371058
             ],
             "msecs":[
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
             ]
          },
          "requestBuckets":{
             "msecs":[

             ],
             "counters":[

             ]
          },
          "overCounts":{
             "maxIntegerSize":18446744073709551615,
             "requestCounter":0,
             "inBytes":0,
             "outBytes":0,
             "1xx":0,
             "2xx":0,
             "3xx":0,
             "4xx":0,
             "5xx":0,
             "miss":0,
             "bypass":0,
             "expired":0,
             "stale":0,
             "updating":0,
             "revalidated":0,
             "hit":0,
             "scarce":0,
             "requestMsecCounter":0
          }
       },
       "*":{
          "requestCounter":6,
          "inBytes":501,
          "outBytes":1764,
          "responses":{
             "1xx":0,
             "2xx":0,
             "3xx":0,
             "4xx":6,
             "5xx":0,
             "miss":0,
             "bypass":0,
             "expired":0,
             "stale":0,
             "updating":0,
             "revalidated":0,
             "hit":0,
             "scarce":0
          },
          "requestMsecCounter":0,
          "requestMsec":0,
          "requestMsecs":{
             "times":[
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
             ],
             "msecs":[
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
             ]
          },
          "requestBuckets":{
             "msecs":[

             ],
             "counters":[

             ]
          },
          "overCounts":{
             "maxIntegerSize":18446744073709551615,
             "requestCounter":0,
             "inBytes":0,
             "outBytes":0,
             "1xx":0,
             "2xx":0,
             "3xx":0,
             "4xx":0,
             "5xx":0,
             "miss":0,
             "bypass":0,
             "expired":0,
             "stale":0,
             "updating":0,
             "revalidated":0,
             "hit":0,
             "scarce":0,
             "requestMsecCounter":0
          }
       }
    },
    "upstreamZones":{
       "upstreamfa42cf143e384152b0205de94ede9d87":[
          {
             "server":"10.10.4.15:8080",
             "requestCounter":0,
             "inBytes":0,
             "outBytes":0,
             "responses":{
                "1xx":0,
                "2xx":0,
                "3xx":0,
                "4xx":0,
                "5xx":0
             },
             "requestMsecCounter":0,
             "requestMsec":0,
             "requestMsecs":{
                "times":[

                ],
                "msecs":[

                ]
             },
             "requestBuckets":{
                "msecs":[

                ],
                "counters":[

                ]
             },
             "responseMsecCounter":0,
             "responseMsec":0,
             "responseMsecs":{
                "times":[

                ],
                "msecs":[

                ]
             },
             "responseBuckets":{
                "msecs":[

                ],
                "counters":[

                ]
             },
             "weight":1,
             "maxFails":15,
             "failTimeout":900,
             "backup":false,
             "down":false,
             "overCounts":{
                "maxIntegerSize":18446744073709551615,
                "requestCounter":0,
                "inBytes":0,
                "outBytes":0,
                "1xx":0,
                "2xx":0,
                "3xx":0,
                "4xx":0,
                "5xx":0,
                "requestMsecCounter":0,
                "responseMsecCounter":0
             }
          }
       ],
       "/var/run/php-webgui.socket":[
          {
             "server":"unix:/var/run/php-webgui.socket",
             "requestCounter":0,
             "inBytes":0,
             "outBytes":0,
             "responses":{
                "1xx":0,
                "2xx":0,
                "3xx":0,
                "4xx":0,
                "5xx":0
             },
             "requestMsecCounter":0,
             "requestMsec":0,
             "requestMsecs":{
                "times":[

                ],
                "msecs":[

                ]
             },
             "requestBuckets":{
                "msecs":[

                ],
                "counters":[

                ]
             },
             "responseMsecCounter":0,
             "responseMsec":0,
             "responseMsecs":{
                "times":[

                ],
                "msecs":[

                ]
             },
             "responseBuckets":{
                "msecs":[

                ],
                "counters":[

                ]
             },
             "weight":0,
             "maxFails":0,
             "failTimeout":0,
             "backup":false,
             "down":false,
             "overCounts":{
                "maxIntegerSize":18446744073709551615,
                "requestCounter":0,
                "inBytes":0,
                "outBytes":0,
                "1xx":0,
                "2xx":0,
                "3xx":0,
                "4xx":0,
                "5xx":0,
                "requestMsecCounter":0,
                "responseMsecCounter":0
             }
          }
       ]
    }
 }
kohly commented 3 months ago

with v 1.0.9 all is working fine again. thank you!