Ad Widget

Collapse

Template App Nginx by HTTP; how do I customize the request URL?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Maxburn
    Member
    • Sep 2019
    • 48

    #1

    Template App Nginx by HTTP; how do I customize the request URL?

    My nginx status page looks like https://arecord.example.com/nginx_st...ingtoobfuscate.

    I might possibly get the location slug down to just the default nginx_status but the DNS A record must be specified or it won't even get to this server.

    What do I need to modify in zabbix to monitor that?

    It looks like Nginx: Get stub status page is what I'm looking for but can't figure out what I need to do.
    Last edited by Maxburn; 07-05-2020, 20:39.
  • Maxburn
    Member
    • Sep 2019
    • 48

    #2
    Not sure if this is the right thing but found configure, templates, Template App Nginx by HTTP, Macros. Edited the info here to match what I needed.

    Immediate question comes to mind what if I have two of these this doesn't seem to be the right way but it worked for my one

    Comment

    • tim.mooney
      Senior Member
      • Dec 2012
      • 1427

      #3
      Which template are you using? Is it this one: https://git.zabbix.com/projects/ZBX/...app/nginx_http

      If it is, did you change the default value in the template for
      Code:
      {$NGINX.STUB_STATUS.PATH}
      ?

      Well-written templates, like the latest official Zabbix templates, make use of macros (think: variables) in many places. Templates that use macros will typically set a default/stock value for the macro, so the template can be applied to "normal" systems and "just work".

      When you apply a template to a host, you can override the default values for any of the macros that are inherited from the template defaults. That way, you don't need to change anything in the template (and you don't need to make a copy of the template), you just apply the template to a host and set one or more macro overrides.

      You'll want to review the documentation for macros, especially how you override inherited user macros for a host.

      When you start to use a template, it's very handy to examine it and see where it uses macros, This gives you an idea of every place the template author(s) anticipated the potential need for per-host customization, and they built that configurability into the template.

      Comment

      • Maxburn
        Member
        • Sep 2019
        • 48

        #4
        Originally posted by tim.mooney
        , especially how you override inherited user macros for a host.
        Thank you, that's actually pretty handy once you know how it works. Pretty low on the discoverability for a first time user though.

        Comment

        Working...