def METHOD_NAME(self):
    self.check('/logviewer/')
    self.check('/logviewer/query/', code=404)
    # check query endpoints
    spec = self.get_keywith(conf.url, 'apps/logviewer/query-')
    base = '/logviewer/query/aggD'
    df = self.df
    df_user1 = df['user.id_1'].eq(1)
    df_uri1 = df['uri_1'].eq(1)
    # check filters
    for col in ['status', 'ip']:
        eq_(
            self.get('{}/filter{}/'.format(base, col)).json(),
            [{col: x} for x in sorted(df[col].unique().astype(str))],
        )
    eq_(
        self.get('{}/filter{}/?_limit=10000'.format(base, 'users')).json(),
        [{'user.id': x} for x in sorted(df[df_user1]['user.id'].unique())],
    )
    # ToDo: See https://github.com/gramener/gramex/issues/252
    ideal = df[df_uri1]['uri'].value_counts().astype(int)[:100]
    ideal = ideal.rename_axis('uri').reset_index(name='views')
    ideal = ideal.sort_values(by=['views', 'uri'], ascending=[False, True])
    ideal.reset_index(inplace=True, drop=True)
    actual = self.get('{}/filter{}/'.format(base, 'uri')).json()
    actual = pd.DataFrame.from_records(actual)
    actual.sort_values(by=['views', 'uri'], ascending=[False, True], inplace=True)
    actual.reset_index(inplace=True, drop=True)
    afe(actual, ideal)
    # check KPIs
    eq_(
        self.get('{}/kpi-{}/'.format(base, 'pageviews')).json(),
        [{'value': len(df[df_uri1].index)}],
    )
    eq_(
        self.get('{}/kpi-{}/'.format(base, 'sessions')).json(),
        [{'value': df[df_user1]['new_session'].sum()}],
    )
    eq_(
        self.get('{}/kpi-{}/'.format(base, 'users')).json(),
        [{'value': df[df_user1]['user.id'].nunique()}],
    )
    eq_(
        self.get('{}/kpi-{}/'.format(base, 'urls')).json(),
        [{'value': df[df_uri1]['uri'].nunique()}],
    )
    r = self.get('{}/kpi-{}/'.format(base, 'avgtimespent')).json()
    aae(
        r[0]['value'],
        df[df_user1]['session_time'].sum() / df[df_user1]['new_session'].sum(),
        4,
    )
    r = self.get('{}/kpi-{}/'.format(base, 'avgloadtime')).json()
    aae(r[0]['value'], df['duration'].mean(), 4)
    # check top10
    topten = [
        {'col': 'user.id', 'url': 'users', 'values': 'views', 'flag': True},
        {'col': 'ip', 'url': 'ip', 'values': 'requests'},
        {'col': 'status', 'url': 'status', 'values': 'requests'},
        {'col': 'uri', 'url': 'uri', 'values': 'views', 'flag': True},
    ]
    for top in topten:
        cond = df[top['col'] + '_1'].eq(1) if top.get('flag') else slice(None)
        eq_(
            self.get('{}/topten{}/'.format(base, top['url'])).json(),
            (
                df[cond][top['col']]
                .value_counts()
                .astype(int)
                .rename_axis(top['col'])
                .reset_index(name=top['values'])
                .sort_values(by=[top['values'], top['col']], ascending=[False, True])[:10]
                .to_dict('r')
            ),
        )
    # check trend
    dff = logviewer.pdagg(df[df_uri1], [{'key': 'time', 'freq': 'D'}], {'duration': ['count']})
    dff['time'] = dff['time'].dt.strftime('%Y-%m-%d 00:00:00')
    dff['pageviews'] = dff['duration_count'].astype(int)
    dff = dff[dff['pageviews'].ne(0)]
    eq_(
        self.get('{}/{}/'.format(base, 'pageviewstrend')).json(),
        dff.drop('duration_count', 1).to_dict('r'),
    )
    dff = logviewer.pdagg(
        df[df_user1], [{'key': 'time', 'freq': 'D'}], {'new_session': ['sum']}
    )
    dff['time'] = dff['time'].dt.strftime('%Y-%m-%d 00:00:00')
    dff['sessions'] = dff['new_session_sum'].astype(int)
    dff = dff[dff['sessions'].ne(0)]
    eq_(
        self.get('{}/{}/'.format(base, 'sessionstrend')).json(),
        dff.drop('new_session_sum', 1).query('sessions != 0').to_dict('r'),
    )
    # TODO trend queries
    for q in spec.kwargs.kwargs.queries.keys():
        if q.endswith('trend'):
            self.check('{}/{}/'.format(base, q))