Want more timely Centmin Mod News Updates?
Become a Member

Nginx Nginx Amplify Open Source Monitoring Service

Discussion in 'Nginx and PHP-FPM news & discussions' started by eva2000, Nov 18, 2015.

  1. Colin

    Colin Active Member

    144
    43
    28
    Oct 7, 2015
    Sheffield UK
    Ratings:
    +109
    Local Time:
    3:17 AM
    1.13.#
    MariaDB 10.1.#
    I had a lot of false positives imho from nodequery. Like server down when I was logged in... but other than that fantastic. I'm willing to accept it's a historic glitch.

    I've signed up to amplify now to see. I like the nginx stats to see whats going on quickly, now and back in time. Currently using litespeed ent, the graphs and quick req/sec tell me enough to panic or go back to sleep.

    Then again there is also longview which also works well. But the nginx insight is probably enough to tip me one way or not as pragmatically if it works and saves time... what's not to like.
     
  2. eva2000

    eva2000 Administrator Staff Member

    41,719
    9,390
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,424
    Local Time:
    12:17 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
  3. eva2000

    eva2000 Administrator Staff Member

    41,719
    9,390
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,424
    Local Time:
    12:17 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    Nginx Amplify has gone public beta now Announcing the Public Beta Release of NGINX Amplify - NGINX

    I had to update my amplify agent via yum

    Code (Text):
    yum update nginx-amplify-agent --disableplugin=priorities --disableexcludes=main
     
    • Like Like x 2
  4. Eugene Morozov

    Eugene Morozov New Member

    3
    4
    3
    Nov 26, 2015
    Ratings:
    +7
    Local Time:
    5:17 AM
    1.9.7
    None
    Hi guys!
    Who has already tried the new version? What do you think about new features and interface improvements?
    Thanks
     
    • Like Like x 1
  5. pamamolf

    pamamolf Premium Member Premium Member

    3,477
    335
    83
    May 31, 2014
    Ratings:
    +642
    Local Time:
    5:17 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    Didn't try the latest one but the old one was not nice at least for me :(

    Node Query is the best for me ....

    I may check it again in a day or two and see if it is better :)
     
  6. eva2000

    eva2000 Administrator Staff Member

    41,719
    9,390
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,424
    Local Time:
    12:17 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    alerts are new right.. i set them up a while ago

    custom dashboards seem a bit confusing. I suggest that you also have a few pre-made custom dashboard templates that folks can create from to start with :)
     
  7. eva2000

    eva2000 Administrator Staff Member

    41,719
    9,390
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,424
    Local Time:
    12:17 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    • Like Like x 1
    • Agree Agree x 1
  8. pamamolf

    pamamolf Premium Member Premium Member

    3,477
    335
    83
    May 31, 2014
    Ratings:
    +642
    Local Time:
    5:17 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    I was about to ask if it can be compatible with logstalgia:
    Code:
    http://logstalgia.io/#news
    ?

    Also is it possible to have unicode characters support for log file as i can see in my language this:

    Code:
    %CE%BD%CE%AD%CE%
     
    Last edited: Jul 5, 2016
  9. eva2000

    eva2000 Administrator Staff Member

    41,719
    9,390
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,424
    Local Time:
    12:17 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    what Centmin Mod Nginx's new format for Nginx Amplify metrics ? seems logstalgia supports nginx log format Logstalgia - a website access log visualization tool but not 100% sure as never used logstalgia and no idea for unicode

    if new log_format i added to Centmin Mod's Nginx doesn't work, just change and revert the vhost conf file to use combined instead main_ext log_format
     
  10. cloud9

    cloud9 Active Member

    140
    54
    28
    Oct 6, 2015
    England
    Ratings:
    +75
    Local Time:
    3:17 AM
    1.11.x
    10.x
    I cannot find

    In the install.sh file to change to

    All help appreciated
     
  11. Colin

    Colin Active Member

    144
    43
    28
    Oct 7, 2015
    Sheffield UK
    Ratings:
    +109
    Local Time:
    3:17 AM
    1.13.#
    MariaDB 10.1.#
    Hi,

    On my file, valid for this date it's line 410. Snippet to help locate it.

    Code:
            # Install package
            update_cmd="yum ${assume_yes} makecache"
            install_cmd="yum ${assume_yes}  --disableexcludes=main install"
    
            install_deb_or_rpm
    
     
    • Like Like x 1
    • Informative Informative x 1
  12. eva2000

    eva2000 Administrator Staff Member

    41,719
    9,390
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,424
    Local Time:
    12:17 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
  13. eva2000

    eva2000 Administrator Staff Member

    41,719
    9,390
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,424
    Local Time:
    12:17 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    wow 1 1/2 yrs later and Nginx Amplify still needs the workaround listed at https://community.centminmod.com/th...en-source-monitoring-service.4963/#post-20812 to install on Centmin Mod LEMP stack servers due to nginx being excluded from yum.conf.

    I posted the small change you need to make in install.sh on line 412 at https://gist.github.com/centminmod/90da4ed19b94524e6fd8dc23fe31fe1f/revisions to change the line to
    Code (Text):
    install_cmd="yum ${assume_yes} install --disableexcludes=main"
    

    so simple to fix in install.sh just add a check to make sure nginx isn't listed in /etc/yum.conf exclude line
    Code (Text):
    grep -w nginx /etc/yum.conf
    exclude=*.i386 *.i586 *.i686 nginx* php* mysql*
    

    Code (Text):
    if [[ "$(grep -w nginx /etc/yum.conf)" ]]; then
      install_cmd="yum ${assume_yes} install --disableexcludes=main"
    else
      install_cmd="yum ${assume_yes} install"
    fi
    

    submitted to issue tracker https://github.com/nginxinc/nginx-amplify-agent/issues/52
     
    Last edited: Jun 14, 2017
    • Informative Informative x 1
  14. pamamolf

    pamamolf Premium Member Premium Member

    3,477
    335
    83
    May 31, 2014
    Ratings:
    +642
    Local Time:
    5:17 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    "wow 1 1/2 yrs later and Nginx Amplify still needs the workaround"

    Is that fixed now?
     
  15. eva2000

    eva2000 Administrator Staff Member

    41,719
    9,390
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,424
    Local Time:
    12:17 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
  16. pamamolf

    pamamolf Premium Member Premium Member

    3,477
    335
    83
    May 31, 2014
    Ratings:
    +642
    Local Time:
    5:17 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    So i should answer at the prompt YES?
     
  17. eva2000

    eva2000 Administrator Staff Member

    41,719
    9,390
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,424
    Local Time:
    12:17 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    yup
     
  18. pamamolf

    pamamolf Premium Member Premium Member

    3,477
    335
    83
    May 31, 2014
    Ratings:
    +642
    Local Time:
    5:17 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    Ok got the prompt:

    Code:
    Packages with the 'nginx' names are excluded in /etc/yum.conf - proceed with install (y/n)?
    I select "y" and installation finish with no errors.....

    Then i got a prompt for :

    Configure NGINX to visualize essential metrics
    Define stub_status in NGINX configuration to build key NGINX graphs. If stub_status is already configured, the Amplify Agent will detect it automatically. For NGINX Plus, you have to configure either the stub_status module or the extended status module.

    Is that already set from Centminmod or i should follow the instructions there to enable it?


    Some metrics are not working :(

    NGINX HTTP Version
    NGINX Request time
    NGINX Upstream Response Time

    Maybe related to stub_status ? or my log format is the old one and doesn't help?

    How i can check this and what log format should i use?
     
    Last edited: Aug 19, 2017
  19. pamamolf

    pamamolf Premium Member Premium Member

    3,477
    335
    83
    May 31, 2014
    Ratings:
    +642
    Local Time:
    5:17 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    After restarting the Nginx all seems ok now :)

    I just don't have stats for NGINX Upstream Response Time only....
     
  20. eva2000

    eva2000 Administrator Staff Member

    41,719
    9,390
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,424
    Local Time:
    12:17 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    nginx stub status is configured by default in main hostname's vhost config file at /usr/local/nginx/conf/conf.d/virtual.conf
    Code (Text):
            location /nginx_status {
            stub_status on;
            #access_log   off;
            allow 127.0.0.1;
            #allow youripaddress;
            deny all;
            }
    

    as per nginx-amplify-doc/amplify-guide.md at master · nginxinc/nginx-amplify-doc · GitHub

    and see nginx-amplify-doc/amplify-guide.md at master · nginxinc/nginx-amplify-doc · GitHub

    additional metrics need changing log format nginx-amplify-doc/amplify-guide.md at master · nginxinc/nginx-amplify-doc · GitHub which centmin mod 123.09beta01 did do for some time but reverted to default for fail2ban support which probably is more important to have :)

    You can setup 2 separate access logs one for nginx default format + one for amplify advanced metrics but need extra work
    nginx-amplify-doc/amplify-guide.md at master · nginxinc/nginx-amplify-doc · GitHub
    So I guess for 123.09beta01 only it would mean something like this in vhosts' config files
    Code (Text):
    access_log /home/nginx/domains/domain.com/log/access.log combined buffer=256k flush=5m;
    access_log /home/nginx/domains/domain.com/log/access-amplify.log main_ext;
    

    thus leaving default combined log format for nginx for access.log and using new separate log for access-amplify.log with main_ext log format that 123.09beta01 has support for in nginx.conf that I added when Nginx amplify first came out
    Code (Text):
    log_format  main  '$remote_addr - $remote_user [$time_local] $request '
                    '"$status" $body_bytes_sent "$http_referer" '
                    '"$http_user_agent" "$http_x_forwarded_for" "$gzip_ratio"'
                    ' "$connection" "$connection_requests" "$request_time"';
    
    log_format  ddos-proxy '$remote_addr for $http_x_real_ip - $remote_user [$time_local] $request '
                    '"$status" $body_bytes_sent "$http_referer" '
                    '"$http_user_agent" "$http_x_forwarded_for" "$gzip_ratio"'
                    ' "$connection" "$connection_requests" "$request_time"';
    
    log_format  main_ext '$remote_addr - $remote_user [$time_local] "$request" '
                             '$status $body_bytes_sent "$http_referer" '
                             '"$http_user_agent" "$http_x_forwarded_for" '
                             'rt=$request_time ua="$upstream_addr" '
                             'us="$upstream_status" ut="$upstream_response_time" '
                             'ul="$upstream_response_length" '
                             'cs=$upstream_cache_status' ;
    

    then in /etc/amplify-agent/agent.conf
    Code (Text):
    [nginx]
    exclude_logs=/home/nginx/domains/*/log/access.log
    

    you'd have to setup a separate access log file for every nginx vhost on your server for this to work
    Code (Text):
    access_log /home/nginx/domains/domain.com/log/access.log combined buffer=256k flush=5m;
    access_log /home/nginx/domains/domain.com/log/access-amplify.log main_ext;
    

    otherwise, the agent.conf exclude_logs will exclude all vhost's access.log unless you change the exclude_logs entry for only specific web host you want to exclude i.e.
    in /etc/amplify-agent/agent.conf
    Code (Text):
    [nginx]
    exclude_logs=/home/nginx/domains/onlydomain.com/log/access.log
    
     
    Last edited: Aug 19, 2017
    • Useful Useful x 1