Ad Widget

Collapse

Nginx monitor

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Satur
    Junior Member
    • Dec 2019
    • 3

    #1

    Nginx monitor

    Hello!
    I am trying to monitor nginx service with this template https://www.zabbix.com/integrations/nginx
    But I am having problems getting values to Server using status page and all template values are empty. Tried both Agent and HTTP templates with no results.
    Both Agent and Get have version 4.4.3 and CentOS 7

    Following commands do not work
    Code:
    zabbix_get -s 127.0.0.1 -k system.run["curl http://127.0.0.1/basic_status"]
    Returns
    curl: (7) Couldn't connect to server
    Code:
    zabbix_get -s 127.0.0.1 -p 10050 -k web.page.get["localhost","basic_status","80"]
    Returns
    ZBX_NOTSUPPORTED: Cannot perform cURL request: Couldn't connect to server.
    Log
    23799:20191204:144827.860 Requested [web.page.get[localhost,basic_status,80]]
    23799:20191204:144827.869 Sending back [ZBX_NOTSUPPORTED: Cannot perform cURL request: Couldn't connect to server.]
    But calling command from command line or with zabbix user works fine
    Code:
    curl http://127.0.0.1/basic_status
    su zabbix -s /bin/bash -c "curl http://localhost/basic_status"
    Both returns
    Active connections: 1
    server accepts handled requests
    1111 2222 3333
    Reading: 0 Writing: 2 Waiting: 3
    What could be the problem here for the zabbix_get commands to run successfully?


    Seems to be some server specific problem, because requesting google.com also does not work on this server while works fine on other servers with the same Agent version
    Code:
    zabbix_get -s 127.0.0.1 -p 10050 -k web.page.get["google.com"]
    Returns
    ZBX_NOTSUPPORTED: Cannot perform cURL request: Couldn't connect to server.

    Thank you!
    Last edited by Satur; 05-12-2019, 14:25.
  • Satur
    Junior Member
    • Dec 2019
    • 3

    #2
    Everything started working after disabling SELinux!
    Un liels paldies par noderīgo produktu!

    Comment

    Working...