~hloeung/ubuntu-repository-cache/cron-more-info

« back to all changes in this revision

Viewing changes to lib/ubuntu_repository_cache/squid.py

  • Committer: mergebot at canonical
  • Author(s): "Haw Loeung"
  • Date: 2022-05-30 03:41:46 UTC
  • mfrom: (346.1.1 ubuntu-repository-cache-charm)
  • Revision ID: mergebot@juju-139df4-prod-is-toolbox-0.canonical.com-20220530034146-hkxkzv1kwgvi7yjx
Fixed nrpe checks, escaping spaces

Reviewed-on: https://code.launchpad.net/~hloeung/ubuntu-repository-cache/fix-nrpe-checks/+merge/423581
Reviewed-by: Thomas Cuthbert <thomas.cuthbert@canonical.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
248
248
 
249
249
 
250
250
def update_checks(nrpe_config):
251
 
    ''''Update Nagios checks for squid serving archive pool content'''
 
251
    ''' 'Update Nagios checks for squid serving archive pool content'''
252
252
 
253
253
    path_base = hookenv.config()['path-base']
254
254
    nrpe_config.add_check(
259
259
            '--hostname localhost '
260
260
            '--url "/{}/pool/" '
261
261
            '--string "main/" '
262
 
            '--expect 200\\\ OK '
263
 
            '--header Accept-Encoding:\\\ \\\*'
 
262
            '--expect 200\\ OK '
 
263
            '--header Accept-Encoding:\\ \\*'
264
264
        ).format(path_base),
265
265
    )