Netdata Community

I cannot view the URL pattern chart

I cannot view the URL pattern chart on my overview page.
I have already set up the URL Pattern configuration in /etc/netdata/go.d/web_log.conf and restarted the deamon but it still doesn’t show up.

Hi, @GeorgiaTs. The answer is on the screenshot (see “url_patterns” syntax).

Do you want me to help to convert from “categories” (python version) to “url_patterns” (go version)?

Hi, @ilyam8
Yes, can you help to convert from “categories” (python version) to “url_patterns” (go version).

@Sharvin_Koli Can you show your “categories”?

@ilyam8 These are my “categories”.

apache_netdata: # name the charts
path: ‘/var/log/apache2/access.log’ # web server log file
SW : ‘^/home/home1’
contact : ‘^/sw/home/contact’
about : ‘^/sw/home/about’
portal : ‘^/sw/home/portal’

Can you convert it from “categories” to “url_patterns”.

@Sharvin_Koli just to make sure you are using the go version. Is the file ‘/etc/netdata/go.d/web_log.conf’ or ‘/etc/netdata/python.d/web_log.conf’?

@ilyam8 Yes, I am using go version and my web_log.conf file is in ‘/etc/netdata/go.d/web_log.conf’ .

Screenshot from 2021-12-06 10-43-47

Is this right syntax to get url patterns in go.d version. But after inserting this syntax in web_log.conf i am not getting web log charts.

What might be problem? Is there any other configuration to deal with?

@Sharvin_Koli the problem is invalid syntax (you will see it if running the plugin in the debug mode)

[ ERROR ] web_log[nginx] weblog.go:85 init failed: create pattern {Name:sw Match:^/home/home1}: invalid syntax

Try the following, it should work

# go.d/web_log.conf
  - name: apache_netdata
    path: '/var/log/apache2/access.log'
      - name: sw
        match: '* /home/home1*'
      - name: contact
        match: '* /sw/home/contact*'
      - name: about
        match: '* /sw/home/about*'
      - name: portal
        match: '* /sw/home/about*'

@ilyam8 Thankyou for helping now it is working.


Basically, it is ‘matcher_type pattern’. '* /home/home1*' means:

  • use glob matcher (’*’).
  • match everything that starts with ‘/home/home1’.