Ad Widget

Collapse

Trying to monitor NGINX

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Robert Harris
    Junior Member
    • May 2012
    • 10

    #1

    Trying to monitor NGINX

    I looked at the pre-built templates from zabbixtemplates ( Tpl_Tribily_App_Nginx_Extended_v1.0 ). I downloaded all the pieces to my server and put the UserPreferences in my zabbix_agentd.conf file and restarted. Imported the template into my server and assigned to a dev host.

    I can see the agents linked to the host but There is nothing in 'latest data' and no errors I can see. I copied the UserParameter into zabbix_agent.conf and restarted, still no data I can see. No errors in the agent log files either.

    If I manually run the shell script to get data it works as well.

    I did not see a thread that showed a piece I missed, please feel free to point me at it if I missed it.

    This is 2.0 and I'm trying to monitor an ubuntu 12.04 (precise) linux Nginx agent.
  • tchjts1
    Senior Member
    • May 2008
    • 1605

    #2
    So for the items at the host level (Not the template level), they are all green and enabled?

    You say you looked in the agent logs. Have you looked in zabbix_server.log for any issues?

    Comment

    • Robert Harris
      Junior Member
      • May 2012
      • 10

      #3
      I went into the Configuration -> Host -> shavano and the "Z" on the far right is blue but there's no hints when I hover over it. Everything else looks normal. The "NGINX" template is listed under templates for the host. If I click on that template I see the configuration for the template and this:

      « Template listTemplate: NGINX Applications (1)Items (8)Triggers (1)Graphs (2)Screens (0)Discovery rules (0)

      If I go into "latest data" for shavano there is no heading for NGINX and I don't see any of the items/triggers under OS/Other,etc either.

      Comment

      • tchjts1
        Senior Member
        • May 2008
        • 1605

        #4
        Go to Configuration --> Hosts and make sure you see your host listed there.
        You should see what templates are attached to your host. Is your template attached?

        While still on that screen, now click on "Items(8)" under the "Items" column.
        Now, all the way out to the right, you will see the status for each item on that particular host. green or red, and possibly an error message if you hover over the red X.

        (The reason you are not seeing the host listed under "Latest Data" is that it has not reported anything yet.)

        Why not try attaching the standard Linux template to that host and see if you don't start getting some basic metrics.

        Comment

        • Robert Harris
          Junior Member
          • May 2012
          • 10

          #5
          If I go to Configuration -> Hosts I see my host (shavano) and under the templates column my NGINX template is there.

          Under Items(51) I see 2 red X's both are related to net.if from my Linux template, not nginx. I do see 8 items marked to the NGINX template. They are marked green.

          I am getting data for another template (Cloned and modified OS default template).

          Comment

          • tchjts1
            Senior Member
            • May 2008
            • 1605

            #6
            Still at the host level, looking at the items for that host... the 8 items you are trying to monitor, 3rd column coming from the right "Applications", what is listed for those items? That is the category they would be under in "Latest Data"

            If there is no application listed, you can go to the template and make a new application "NGIX" or whatever you want to call it... then they will list under that category.

            Comment

            • Robert Harris
              Junior Member
              • May 2012
              • 10

              #7
              They are all listed under "Zabbix agent (active)" versus the rest of the agent items which are just "Zabbix agent".

              Comment

              • tchjts1
                Senior Member
                • May 2008
                • 1605

                #8
                No, that is "type". You are looking for "Application". That is what generates the various categories under "Latest Data"

                And if they are Zabbix Agent (Active), then the host name in zabbix_agentd.conf (Hostname=xxx) must match exactly as you have it in the Zabbix GUI.

                Try switching those items to just Zabbix Agent.

                Comment

                • Robert Harris
                  Junior Member
                  • May 2012
                  • 10

                  #9
                  Sorry, I'll go with the excuse I counted, 0,1,2,3 :>

                  The application column reads "Nginx"

                  Many thanks for all the help.

                  Robert

                  Comment

                  • tchjts1
                    Senior Member
                    • May 2008
                    • 1605

                    #10
                    No problem. I thought that may throw you off when I typed it.

                    Anyway, if you are still not getting data, change "type" to Zabbix Agent instead of Zabbix Agent (Active). See if you get data that way.

                    Comment

                    • Robert Harris
                      Junior Member
                      • May 2012
                      • 10

                      #11
                      Some data just hit for NGINX now.... I'll give it the weekend to see if it continues to populate and I cna start acting on it.

                      Many thanks again!

                      Comment

                      • Robert Harris
                        Junior Member
                        • May 2012
                        • 10

                        #12
                        It updates, I'm getting # of nginx running (2) but the other 7 all show an error. They all say rerceived is not suitable for value type and then a number format Numeric [float] or "Numeric [unsigned] and data type [ decimal ] "

                        I see where to change the values but I'm not sure what to set it to. When I run the shell script for "active" it returns a 1, but that is one that reports Numeric [unsigned] and data type [decimal] are invalid.

                        Comment

                        • Robert Harris
                          Junior Member
                          • May 2012
                          • 10

                          #13
                          Yeah, changing the datatype to "character" disabled the errors but It's still not recording or accepting data.

                          Comment

                          • burn1024
                            Member
                            • Jun 2012
                            • 52

                            #14
                            use
                            Code:
                            "zabbix_get -s $client_ip -k $parameter_name"
                            from server to verify that server gets the correct values. If it doesn't, troubleshoot on client side: do
                            Code:
                            sudo su - zabbix -s /bin/bash
                            and run commands specified as UserParameters in zabbix_agentd.conf. Verify that UserParameter name in zabbix_agentd.conf and item key in Zabbix GUI are the same. Also increasing DebugLevel in zabbix_agentd.conf and examining /var/log/zabbix_agentd.conf might help.

                            Comment

                            • techguybr
                              Junior Member
                              • Oct 2019
                              • 1

                              #15
                              Zabbix 4.4 comes with a native template to monitor Nginx web servers: https://techexpert.tips/zabbix/zabbix-monitor-nginx/

                              Comment

                              Working...