circonus-labs / circonus-one-step-install

Circonus One Step Installer
BSD 3-Clause "New" or "Revised" License
5 stars 7 forks source link

`cosi reset --all` errors when deleting a worksheet #14

Closed smartb-pair closed 7 years ago

smartb-pair commented 7 years ago

We're using the postgres plugin in our test environment and need to clean up after it:

/opt/circonus/cosi/bin/cosi-plugin-postgres --enable --database postgres --user cosi
...
/opt/circonus/cosi/bin/cosi-plugin-postgres --disable --database postgres --user cosi
/opt/circonus/cosi/bin/cosi reset --all

Unfortunately, this fails:

/opt/circonus/cosi/bin/cosi reset --all
Found 1 worksheets.
Found 0 graphs.
Found 0 dashboards.
Found 0 checks.
Checking COSI 999e43e3-2ae8-45ea-8eb0-7bb5b53f4484 999e43e3-2ae8-45ea-8eb0-7bb5b53f4484 /worksheet/06b3f167-821d-e6ea-8def-e150897c3cbb
/opt/circonus/cosi/bin/cosi-reset:88
        if (getCode === 404 && (getResult.code && getResult.code === "ObjectError.InstanceNotFound")) {
                                         ^

TypeError: Cannot read property 'code' of null
    at /opt/circonus/cosi/bin/cosi-reset:88:42
    at IncomingMessage.<anonymous> (/opt/circonus/cosi/lib/cosi/api/index.js:187:17)
    at emitNone (events.js:72:20)
    at IncomingMessage.emit (events.js:166:7)
    at endReadableNT (_stream_readable.js:913:12)
    at nextTickCallbackWith2Args (node.js:442:9)
    at process._tickCallback (node.js:356:17)

cosi reset -c -g succeeds though.

smartb-pair commented 7 years ago

@arochaf cc

maier commented 7 years ago

I ran into this yesterday as well. There is a fix in the next PR.

smartb-pair commented 7 years ago

@maier, we've actually found this error occurs even with the reset -c -g options - does the PR still apply (and which PR is that? it's not clear in the open PRs).

maier commented 7 years ago

It is in the casandra branch.

smartb-pair commented 7 years ago

We're also seeing this error when trying to run our Chef-driven COSI install for Postgres from Test Kitchen:

==========
           Enabling agent plugin for PostgreSQL database 'postgres'
           Verifying 'psql'
            Passed psql test
            Created plugin config
            Created protocol_observer config
            Activating PostgreSQL plugin scripts
            Enabled agent plugin for PostgreSQL
           ==========
           Configuring plugin for registration
            Sending new metrics to http://127.0.0.1:2609/write/postgres_protocol_observer
            Added new metrics for protocol_observer.
            Fetching templates for dashboard-postgres
            Saved template /opt/circonus/cosi/registration/template-dashboard-postgres-postgres.json
            Saved meta configuration
            Configuring forecast widgets
                Loading FS metrics
                Found metric 'fs`/var/lib/postgresql/9.4/main`df_used_percent'
                Found widget '{{=cosi.dashboard_instance}} file system full forecast', setting metric name
           ==========
           Updating registration

           Registration - creating checks and visuals

           Registration - setup
           ==========
           Verify Circonus API access
           API key verified for account smartb
           ==========
           Setting check target
           Reverse agent using ef7a1679-326e-4794-85b9-f59c39d9c6eb
           ==========
           Loading broker information
           Fetching broker list from Circonus
           Checking Custom configuration for default broker list
           Fetching default broker list from COSI
           ==========
           Determine default broker for json
           Checking for custom broker settings
           Checking for enterprise brokers
            52.58.25.243:43191 OK
           Found enterprise brokers, using 1231 eu-central-1
           ==========
           Determine default broker for trap
           Checking for custom broker settings
           Checking for enterprise brokers
            52.58.25.243:43191 OK
           Found enterprise brokers, using 1231 eu-central-1
           ==========
           Checking StatsD port
            StatsD disabled, skipping.
           ==========
           Save registration configuration
           Registration configuration saved /opt/circonus/cosi/registration/setup-config.json
           ==========
           Fetch available metrics from NAD
           Metrics loaded
             postgres_protocol_observer has 60 metrics
             cpu has 16 metrics
             diskstats has 319 metrics
             fs has 120 metrics
             if has 12 metrics
             vm has 56 metrics
             pg_protocol_observer has 0 metrics
             pg_isready has 1 metrics
             pg_bgwriter has 4 metrics
             pg_connections has 7 metrics
             pg_repl_slots has 0 metrics
             pg_cache has 3 metrics
             pg_repl_lag has 0 metrics
             pg_locks has 3 metrics
             pg_transactions has 3 metrics
             pg_partitions has 1 metrics
             pg_db_size has 3 metrics
             pg_table_stats has 11 metrics
             pg_vacuum has 3 metrics
             disk has 108 metrics
             pg_replication has 2 metrics
           Total metrics: 732
           Saving available metrics
           Metrics saved /opt/circonus/cosi/registration/setup-metrics.json
           ==========
           Fetching templates
           Skipping check-system, template exists, use --force to overwrite.
           Skipping worksheet-system, template exists, use --force to overwrite.
           Adding graph-postgres_protocol_observer to fetch list
           Skipping graph-cpu, template exists, use --force to overwrite.
           Adding graph-diskstats to fetch list
           Skipping graph-fs, template exists, use --force to overwrite.
           Skipping graph-if, template exists, use --force to overwrite.
           Skipping graph-vm, template exists, use --force to overwrite.
           Adding graph-pg_protocol_observer to fetch list
           Adding graph-pg_isready to fetch list
           Adding graph-pg_bgwriter to fetch list
           Adding graph-pg_connections to fetch list
           Adding graph-pg_repl_slots to fetch list
           Adding graph-pg_cache to fetch list
           Adding graph-pg_repl_lag to fetch list
           Adding graph-pg_locks to fetch list
           Adding graph-pg_transactions to fetch list
           Adding graph-pg_partitions to fetch list
           Adding graph-pg_db_size to fetch list
           Adding graph-pg_table_stats to fetch list
           Adding graph-pg_vacuum to fetch list
           Skipping graph-disk, template exists, use --force to overwrite.
           Adding graph-pg_replication to fetch list
           ---
           Fetching template(s) for: graph-postgres_protocol_observer, graph-diskstats, graph-pg_protocol_observer, graph-pg_isready, graph-pg_bgwriter, graph-pg_connections, graph-pg_repl_slots, graph-pg_cache, graph-pg_repl_lag, graph-pg_locks, graph-pg_transactions, graph-pg_partitions, graph-pg_db_size, graph-pg_table_stats, graph-pg_vacuum, graph-pg_replication
           ---
           Saved template: /opt/circonus/cosi/registration/template-graph-postgres_protocol_observer.json
           Saved template: /opt/circonus/cosi/registration/template-graph-pg_bgwriter.json
           Saved template: /opt/circonus/cosi/registration/template-graph-pg_connections.json
           Saved template: /opt/circonus/cosi/registration/template-graph-pg_cache.json
           Saved template: /opt/circonus/cosi/registration/template-graph-pg_locks.json
           Saved template: /opt/circonus/cosi/registration/template-graph-pg_transactions.json
           Saved template: /opt/circonus/cosi/registration/template-graph-pg_db_size.json
           Saved template: /opt/circonus/cosi/registration/template-graph-pg_table_stats.json
           Checked 16, fetched 8, warnings 8, errors 0

           Registration - checks
           ==========
           Configuring system check
            Check configuration already exists. /opt/circonus/cosi/registration/config-check-system.json
           ==========
           Creating system check
            Registration exists using /opt/circonus/cosi/registration/registration-check-system.json
           ==========
           Finalizing system check
            Creating NAD Reverse configuration
            Saved NAD Reverse configuration /opt/circonus/cosi/etc/circonus-nadreversesh

           Registration - graphs
           ==========
           Loading check meta data
           Loaded check meta data
           ==========
           Loading available metrics
            postgres_protocol_observer has 60 metrics
            cpu has 16 metrics
            diskstats has 319 metrics
            fs has 120 metrics
            if has 12 metrics
            vm has 56 metrics
            pg_protocol_observer has 0 metrics
            pg_isready has 1 metrics
            pg_bgwriter has 4 metrics
            pg_connections has 7 metrics
            pg_repl_slots has 0 metrics
            pg_cache has 3 metrics
            pg_repl_lag has 0 metrics
            pg_locks has 3 metrics
            pg_transactions has 3 metrics
            pg_partitions has 1 metrics
            pg_db_size has 3 metrics
            pg_table_stats has 11 metrics
            pg_vacuum has 3 metrics
            disk has 108 metrics
            pg_replication has 2 metrics
            Total metrics: 732
           Metrics loaded
           ==========
           Identifying graph templates
            Found graph-cpu template-graph-cpu.json
            Found graph-disk template-graph-disk.json
            Found graph-fs template-graph-fs.json
            Found graph-if template-graph-if.json
            Found graph-pg_bgwriter template-graph-pg_bgwriter.json
            Found graph-pg_cache template-graph-pg_cache.json
            Found graph-pg_connections template-graph-pg_connections.json
            Found graph-pg_db_size template-graph-pg_db_size.json
            Found graph-pg_locks template-graph-pg_locks.json
            Found graph-pg_table_stats template-graph-pg_table_stats.json
            Found graph-pg_transactions template-graph-pg_transactions.json
            Found graph-postgres_protocol_observer template-graph-postgres_protocol_observer.json
            Found graph-vm template-graph-vm.json
           ==========
           Configuring graphs for cpu
            Using template /opt/circonus/cosi/registration/template-graph-cpu.json
            Graph configuration already exists. /opt/circonus/cosi/registration/config-graph-cpu-0.json
           Configuring graphs for disk
            Using template /opt/circonus/cosi/registration/template-graph-disk.json
           Configuring graphs for fs
            Using template /opt/circonus/cosi/registration/template-graph-fs.json
            Graph configuration already exists. /opt/circonus/cosi/registration/config-graph-fs-0-_run.json
            Graph configuration already exists. /opt/circonus/cosi/registration/config-graph-fs-0-_.json
            Graph configuration already exists. /opt/circonus/cosi/registration/config-graph-fs-0-_sys_fs_cgroup.json
            Graph configuration already exists. /opt/circonus/cosi/registration/config-graph-fs-0-_run_lock.json
            Graph configuration already exists. /opt/circonus/cosi/registration/config-graph-fs-0-_run_shm.json
            Graph configuration already exists. /opt/circonus/cosi/registration/config-graph-fs-0-_run_user.json
            Graph configuration already exists. /opt/circonus/cosi/registration/config-graph-fs-0-_mnt.json
            Graph configuration already exists. /opt/circonus/cosi/registration/config-graph-fs-0-_postgres.json
            Graph configuration already exists. /opt/circonus/cosi/registration/config-graph-fs-0-_var_lib_postgresql_9_4_main.json
            Graph configuration already exists. /opt/circonus/cosi/registration/config-graph-fs-0-_var_log_postgres.json
           Configuring graphs for if
            Using template /opt/circonus/cosi/registration/template-graph-if.json
            Graph configuration already exists. /opt/circonus/cosi/registration/config-graph-if-0-eth0.json
            Graph configuration already exists. /opt/circonus/cosi/registration/config-graph-if-0-eth1.json
            Graph configuration already exists. /opt/circonus/cosi/registration/config-graph-if-1-eth0.json
            Graph configuration already exists. /opt/circonus/cosi/registration/config-graph-if-1-eth1.json
           Configuring graphs for pg_bgwriter
            Using template /opt/circonus/cosi/registration/template-graph-pg_bgwriter.json
            Creating graph 0 config for pg_bgwriter
            Applying custom config options and interpolating templates
            Interpolating title {{=cosi.host_name}} Postgres Bgwriters
            Interpolating description Postgres bgwriter info
            Saved config /opt/circonus/cosi/registration/config-graph-pg_bgwriter-0.json
           Configuring graphs for pg_cache
            Using template /opt/circonus/cosi/registration/template-graph-pg_cache.json
            Creating graph 0 config for pg_cache.postgres
            Applying custom config options and interpolating templates
            Interpolating title {{=cosi.host_name}} {{=cosi.graph_item}} Postgres Cache
            Interpolating description Postgres {{=cosi.graph_item}} cache info
            Saved config /opt/circonus/cosi/registration/config-graph-pg_cache-0-postgres.json
           Configuring graphs for pg_connections
            Using template /opt/circonus/cosi/registration/template-graph-pg_connections.json
            Creating graph 0 config for pg_connections
            Applying custom config options and interpolating templates
            Interpolating title {{=cosi.host_name}} Postgres Connections
            Interpolating description Postgres connections
            Saved config /opt/circonus/cosi/registration/config-graph-pg_connections-0.json
           Configuring graphs for pg_db_size
            Using template /opt/circonus/cosi/registration/template-graph-pg_db_size.json
            Creating graph 0 config for pg_db_size.template1
            Applying custom config options and interpolating templates
            Interpolating title {{=cosi.host_name}} {{=cosi.graph_item}} Postgres Database Size
            Interpolating description Postgres {{=cosi.graph_item}} database size
            Interpolating C:AQL statement metric:average("{{=cosi.check_uuid}}","pg_db_size`{{=cosi.graph_item}}") | forecasting:dewma(0.2, 0.001, fill=2) for metric null
            Saved config /opt/circonus/cosi/registration/config-graph-pg_db_size-0-template1.json
            Creating graph 0 config for pg_db_size.template0
            Applying custom config options and interpolating templates
            Interpolating title {{=cosi.host_name}} {{=cosi.graph_item}} Postgres Database Size
            Interpolating description Postgres {{=cosi.graph_item}} database size
            Interpolating C:AQL statement metric:average("{{=cosi.check_uuid}}","pg_db_size`{{=cosi.graph_item}}") | forecasting:dewma(0.2, 0.001, fill=2) for metric null
            Saved config /opt/circonus/cosi/registration/config-graph-pg_db_size-0-template0.json
           Configuring graphs for pg_locks
            Using template /opt/circonus/cosi/registration/template-graph-pg_locks.json
            Creating graph 0 config for pg_locks
            Applying custom config options and interpolating templates
            Interpolating title {{=cosi.host_name}} Postgres Locks
            Interpolating description Postgres lock info
            Saved config /opt/circonus/cosi/registration/config-graph-pg_locks-0.json
           Configuring graphs for pg_table_stats
            Using template /opt/circonus/cosi/registration/template-graph-pg_table_stats.json
            Creating graph 0 config for pg_table_stats
            Applying custom config options and interpolating templates
            Interpolating title {{=cosi.host_name}} table stats
            Interpolating description
            Saved config /opt/circonus/cosi/registration/config-graph-pg_table_stats-0.json
            Creating graph 1 config for pg_table_stats
            Applying custom config options and interpolating templates
            Interpolating title circonus seq/index scans
            Interpolating description
            Saved config /opt/circonus/cosi/registration/config-graph-pg_table_stats-1.json
           Configuring graphs for pg_transactions
            Using template /opt/circonus/cosi/registration/template-graph-pg_transactions.json
            Creating graph 0 config for pg_transactions
            Applying custom config options and interpolating templates
            Interpolating title {{=cosi.host_name}} Postgres Commits
            Interpolating description Postgres commits
            Saved config /opt/circonus/cosi/registration/config-graph-pg_transactions-0.json
           Configuring graphs for postgres_protocol_observer
            Using template /opt/circonus/cosi/registration/template-graph-postgres_protocol_observer.json
            Creating graph 0 config for postgres_protocol_observer
            Applying custom config options and interpolating templates
            Interpolating title {{=cosi.host_name}} Postgres Execute Latency
            Interpolating description Postgres Execute Latency
            Interpolating C:AQL statement metric:histogram("{{=cosi.check_uuid}}","postgres_protocol_observer`Execute`latency") | histogram:rate() for metric null
            Interpolating C:AQL statement metric:histogram("{{=cosi.check_uuid}}","postgres_protocol_observer`Execute`latency") | histogram:percentile(0,25,50,75,100) for metric null
            Saved config /opt/circonus/cosi/registration/config-graph-postgres_protocol_observer-0.json
            Creating graph 1 config for postgres_protocol_observer
            Applying custom config options and interpolating templates
            Interpolating title {{=cosi.host_name}} Postgres Query Latency
            Interpolating description Postgres Query Latency
            Interpolating C:AQL statement metric:histogram("{{=cosi.check_uuid}}","postgres_protocol_observer`Query`latency") | histogram:rate() for metric null
            Interpolating C:AQL statement metric:histogram("{{=cosi.check_uuid}}","postgres_protocol_observer`Query`latency") | histogram:percentile(0,25,50,75,100) for metric null
            Saved config /opt/circonus/cosi/registration/config-graph-postgres_protocol_observer-1.json
            Creating graph 2 config for postgres_protocol_observer
            Applying custom config options and interpolating templates
            Interpolating title {{=cosi.host_name}} Postgres Bound Query Latency
            Interpolating description Postgres Bind Latency
            Interpolating C:AQL statement metric:histogram("{{=cosi.check_uuid}}","postgres_protocol_observer`Bind`latency") | histogram:rate() for metric null
            Interpolating C:AQL statement metric:histogram("{{=cosi.check_uuid}}","postgres_protocol_observer`Bind`latency") | histogram:percentile(0,25,50,75,100) for metric null
            Saved config /opt/circonus/cosi/registration/config-graph-postgres_protocol_observer-2.json
           Configuring graphs for vm
            Using template /opt/circonus/cosi/registration/template-graph-vm.json
            Graph configuration already exists. /opt/circonus/cosi/registration/config-graph-vm-0.json
            Graph configuration already exists. /opt/circonus/cosi/registration/config-graph-vm-1.json
           ==========
           Creating graph /opt/circonus/cosi/registration/config-graph-cpu-0.json
            Registration exists using /opt/circonus/cosi/registration/registration-graph-cpu-0.json
           ==========
           Creating graph /opt/circonus/cosi/registration/config-graph-fs-0-_.json
            Registration exists using /opt/circonus/cosi/registration/registration-graph-fs-0-_.json
           ==========
           Creating graph /opt/circonus/cosi/registration/config-graph-fs-0-_mnt.json
            Registration exists using /opt/circonus/cosi/registration/registration-graph-fs-0-_mnt.json
           ==========
           Creating graph /opt/circonus/cosi/registration/config-graph-fs-0-_postgres.json
            Registration exists using /opt/circonus/cosi/registration/registration-graph-fs-0-_postgres.json
           ==========
           Creating graph /opt/circonus/cosi/registration/config-graph-fs-0-_run.json
            Registration exists using /opt/circonus/cosi/registration/registration-graph-fs-0-_run.json
           ==========
           Creating graph /opt/circonus/cosi/registration/config-graph-fs-0-_run_lock.json
            Registration exists using /opt/circonus/cosi/registration/registration-graph-fs-0-_run_lock.json
           ==========
           Creating graph /opt/circonus/cosi/registration/config-graph-fs-0-_run_shm.json
            Registration exists using /opt/circonus/cosi/registration/registration-graph-fs-0-_run_shm.json
           ==========
           Creating graph /opt/circonus/cosi/registration/config-graph-fs-0-_run_user.json
            Registration exists using /opt/circonus/cosi/registration/registration-graph-fs-0-_run_user.json
           ==========
           Creating graph /opt/circonus/cosi/registration/config-graph-fs-0-_sys_fs_cgroup.json
            Registration exists using /opt/circonus/cosi/registration/registration-graph-fs-0-_sys_fs_cgroup.json
           ==========
           Creating graph /opt/circonus/cosi/registration/config-graph-fs-0-_var_lib_postgresql_9_4_main.json
            Registration exists using /opt/circonus/cosi/registration/registration-graph-fs-0-_var_lib_postgresql_9_4_main.json
           ==========
           Creating graph /opt/circonus/cosi/registration/config-graph-fs-0-_var_log_postgres.json
            Registration exists using /opt/circonus/cosi/registration/registration-graph-fs-0-_var_log_postgres.json
           ==========
           Creating graph /opt/circonus/cosi/registration/config-graph-if-0-eth0.json
            Registration exists using /opt/circonus/cosi/registration/registration-graph-if-0-eth0.json
           ==========
           Creating graph /opt/circonus/cosi/registration/config-graph-if-0-eth1.json
            Registration exists using /opt/circonus/cosi/registration/registration-graph-if-0-eth1.json
           ==========
           Creating graph /opt/circonus/cosi/registration/config-graph-if-1-eth0.json
            Registration exists using /opt/circonus/cosi/registration/registration-graph-if-1-eth0.json
           ==========
           Creating graph /opt/circonus/cosi/registration/config-graph-if-1-eth1.json
            Registration exists using /opt/circonus/cosi/registration/registration-graph-if-1-eth1.json
           ==========
           Creating graph /opt/circonus/cosi/registration/config-graph-pg_bgwriter-0.json
            Sending graph configuration to Circonus API
            Saving registration /opt/circonus/cosi/registration/registration-graph-pg_bgwriter-0.json
            Graph created: https://smartb.circonus.com/trending/graphs/view/797d4fad-fbe5-68f5-a056-bab009e4160d
           ==========
           Creating graph /opt/circonus/cosi/registration/config-graph-pg_cache-0-postgres.json
            Sending graph configuration to Circonus API
            Saving registration /opt/circonus/cosi/registration/registration-graph-pg_cache-0-postgres.json
            Graph created: https://smartb.circonus.com/trending/graphs/view/57532b2e-f437-c644-95b4-eccd9a3b0fc6
           ==========
           Creating graph /opt/circonus/cosi/registration/config-graph-pg_connections-0.json
            Sending graph configuration to Circonus API
            Saving registration /opt/circonus/cosi/registration/registration-graph-pg_connections-0.json
            Graph created: https://smartb.circonus.com/trending/graphs/view/cfe01ea8-c4af-e407-bd26-c680b2279013
           ==========
           Creating graph /opt/circonus/cosi/registration/config-graph-pg_db_size-0-template0.json
            Sending graph configuration to Circonus API
            Saving registration /opt/circonus/cosi/registration/registration-graph-pg_db_size-0-template0.json
            Graph created: https://smartb.circonus.com/trending/graphs/view/a9efd107-7167-ee4f-bfd2-adf792a822e7
           ==========
           Creating graph /opt/circonus/cosi/registration/config-graph-pg_db_size-0-template1.json
            Sending graph configuration to Circonus API
            Saving registration /opt/circonus/cosi/registration/registration-graph-pg_db_size-0-template1.json
            Graph created: https://smartb.circonus.com/trending/graphs/view/719f79e7-34ec-ea5b-fee8-dfee91be6ed6
           ==========
           Creating graph /opt/circonus/cosi/registration/config-graph-pg_locks-0.json
            Sending graph configuration to Circonus API
            Saving registration /opt/circonus/cosi/registration/registration-graph-pg_locks-0.json
            Graph created: https://smartb.circonus.com/trending/graphs/view/7c1df9c3-ad21-6c3a-d5ea-fc559e988b0b
           ==========
           Creating graph /opt/circonus/cosi/registration/config-graph-pg_table_stats-0.json
            Sending graph configuration to Circonus API
            Saving registration /opt/circonus/cosi/registration/registration-graph-pg_table_stats-0.json
            Graph created: https://smartb.circonus.com/trending/graphs/view/6694cfa2-5fad-6647-cc9b-bdfaae7fda37
           ==========
           Creating graph /opt/circonus/cosi/registration/config-graph-pg_table_stats-1.json
            Sending graph configuration to Circonus API
            Saving registration /opt/circonus/cosi/registration/registration-graph-pg_table_stats-1.json
            Graph created: https://smartb.circonus.com/trending/graphs/view/3bd7eb61-7010-ccaf-ea05-d5ffa66a6635
           ==========
           Creating graph /opt/circonus/cosi/registration/config-graph-pg_transactions-0.json
            Sending graph configuration to Circonus API
            Saving registration /opt/circonus/cosi/registration/registration-graph-pg_transactions-0.json
            Graph created: https://smartb.circonus.com/trending/graphs/view/f509ad5f-88ad-4362-afe2-894944a9e542
           ==========
           Creating graph /opt/circonus/cosi/registration/config-graph-postgres_protocol_observer-0.json
            Sending graph configuration to Circonus API
            Saving registration /opt/circonus/cosi/registration/registration-graph-postgres_protocol_observer-0.json
            Graph created: https://smartb.circonus.com/trending/graphs/view/e0f62d27-ef76-cbbe-90c0-b78db6652b96
           ==========
           Creating graph /opt/circonus/cosi/registration/config-graph-postgres_protocol_observer-1.json
            Sending graph configuration to Circonus API
            Saving registration /opt/circonus/cosi/registration/registration-graph-postgres_protocol_observer-1.json
            Graph created: https://smartb.circonus.com/trending/graphs/view/63454df7-fed5-62b2-d769-e7a78c7b7f76
           ==========
           Creating graph /opt/circonus/cosi/registration/config-graph-postgres_protocol_observer-2.json
            Sending graph configuration to Circonus API
            Saving registration /opt/circonus/cosi/registration/registration-graph-postgres_protocol_observer-2.json
            Graph created: https://smartb.circonus.com/trending/graphs/view/cc2cf25a-855b-40b4-cec4-efe3094cf079
           ==========
           Creating graph /opt/circonus/cosi/registration/config-graph-vm-0.json
            Registration exists using /opt/circonus/cosi/registration/registration-graph-vm-0.json
           ==========
           Creating graph /opt/circonus/cosi/registration/config-graph-vm-1.json
            Registration exists using /opt/circonus/cosi/registration/registration-graph-vm-1.json

           Registration - worksheets
           ==========
           Configuring Worksheets
            Worksheet configuration already exists /opt/circonus/cosi/registration/config-worksheet-system.json
           ==========
           Creating Worksheets
            Registration exists using /opt/circonus/cosi/registration/registration-worksheet-system.json

           Registration - dashboards
           ==========
           Loading check meta data
           Loaded check meta data
           ==========
           Identifying dashboard templates
            Found dashboard-postgres template-dashboard-postgres-postgres.json
           Loaded 1 template(s)
           ==========
           Loading available metrics
            postgres_protocol_observer has 60 metrics
            cpu has 16 metrics
            diskstats has 319 metrics
            fs has 120 metrics
            if has 12 metrics
            vm has 56 metrics
            pg_protocol_observer has 0 metrics
            pg_isready has 1 metrics
            pg_bgwriter has 4 metrics
            pg_connections has 7 metrics
            pg_repl_slots has 0 metrics
            pg_cache has 3 metrics
            pg_repl_lag has 0 metrics
            pg_locks has 3 metrics
            pg_transactions has 3 metrics
            pg_partitions has 1 metrics
            pg_db_size has 3 metrics
            pg_table_stats has 11 metrics
            pg_vacuum has 3 metrics
            disk has 108 metrics
            pg_replication has 2 metrics
            Total metrics: 732
           Metrics loaded
           ==========
           Loading graphs
            Extracting meta data from registration-graph-cpu-0.json
            Extracting meta data from registration-graph-fs-0-_.json
            Extracting meta data from registration-graph-fs-0-_mnt.json
            Extracting meta data from registration-graph-fs-0-_postgres.json
            Extracting meta data from registration-graph-fs-0-_run.json
            Extracting meta data from registration-graph-fs-0-_run_lock.json
            Extracting meta data from registration-graph-fs-0-_run_shm.json
            Extracting meta data from registration-graph-fs-0-_run_user.json
            Extracting meta data from registration-graph-fs-0-_sys_fs_cgroup.json
            Extracting meta data from registration-graph-fs-0-_var_lib_postgresql_9_4_main.json
            Extracting meta data from registration-graph-fs-0-_var_log_postgres.json
            Extracting meta data from registration-graph-if-0-eth0.json
            Extracting meta data from registration-graph-if-0-eth1.json
            Extracting meta data from registration-graph-if-1-eth0.json
            Extracting meta data from registration-graph-if-1-eth1.json
            Extracting meta data from registration-graph-pg_bgwriter-0.json
            Extracting meta data from registration-graph-pg_cache-0-postgres.json
            Extracting meta data from registration-graph-pg_connections-0.json
            Extracting meta data from registration-graph-pg_db_size-0-template0.json
            Extracting meta data from registration-graph-pg_db_size-0-template1.json
            Extracting meta data from registration-graph-pg_locks-0.json
            Extracting meta data from registration-graph-pg_table_stats-0.json
            Extracting meta data from registration-graph-pg_table_stats-1.json
            Extracting meta data from registration-graph-pg_transactions-0.json
            Extracting meta data from registration-graph-postgres_protocol_observer-0.json
            Extracting meta data from registration-graph-postgres_protocol_observer-1.json
            Extracting meta data from registration-graph-postgres_protocol_observer-2.json
            Extracting meta data from registration-graph-vm-0.json
            Extracting meta data from registration-graph-vm-1.json
           Loaded meta data from 29 graphs
           Configuring dasbhoards for 1 template(s)
           ==========
           Configuring dasbhoard
            Dashboard: postgres-postgres (/opt/circonus/cosi/registration/template-dashboard-postgres-postgres.json)
            Using meta data from /opt/circonus/cosi/registration/meta-dashboard-postgres-postgres.json
            Interpolating title Postgres {{=cosi.dashboard_instance}}
            Configuring graph widgets
            Configuring gauge widgets
            Configuring forecast widgets
                Configured forecast widget 'postgres file system full forecast'
            Purging unconfigured widgets
            Saved configuration /opt/circonus/cosi/registration/config-dashboard-postgres-postgres.json
           ==========
           Creating dashboard /opt/circonus/cosi/registration/config-dashboard-postgres-postgres.json
            Sending dashboard configuration to Circonus API
            Saving registration /opt/circonus/cosi/registration/registration-dashboard-postgres-postgres.json
            Dashboard created: https://smartb.circonus.com/dashboards/view/4eebe3b2-f3b7-c82c-ede9-f8df5294d82d
           ==========
           Updating system check
            Registration found using /opt/circonus/cosi/registration/registration-check-system.json
           Collecting required metrics from registered visuals
            Loading required metrics from /opt/circonus/cosi/registration/registration-dashboard-postgres-postgres.json
                Adding required metric: pg_transactions`commits
                Adding required metric: pg_cache`postgres`cache_hit_ratio
            Loading required metrics from /opt/circonus/cosi/registration/registration-graph-cpu-0.json
                Adding required metric: cpu`idle
                Adding required metric: cpu`intr
                Adding required metric: cpu`kernel
                Adding required metric: cpu`user
                Adding required metric: cpu`wait_io
            Loading required metrics from /opt/circonus/cosi/registration/registration-graph-fs-0-_.json
                Adding required metric: fs`/`df_used_percent
                Adding required metric: fs`/`df_used_inode_percent
            Loading required metrics from /opt/circonus/cosi/registration/registration-graph-fs-0-_mnt.json
                Adding required metric: fs`/mnt`df_used_percent
                Adding required metric: fs`/mnt`df_used_inode_percent
            Loading required metrics from /opt/circonus/cosi/registration/registration-graph-fs-0-_postgres.json
                Adding required metric: fs`/postgres`df_used_percent
                Adding required metric: fs`/postgres`df_used_inode_percent
            Loading required metrics from /opt/circonus/cosi/registration/registration-graph-fs-0-_run.json
                Adding required metric: fs`/run`df_used_percent
                Adding required metric: fs`/run`df_used_inode_percent
            Loading required metrics from /opt/circonus/cosi/registration/registration-graph-fs-0-_run_lock.json
                Adding required metric: fs`/run/lock`df_used_percent
                Adding required metric: fs`/run/lock`df_used_inode_percent
            Loading required metrics from /opt/circonus/cosi/registration/registration-graph-fs-0-_run_shm.json
                Adding required metric: fs`/run/shm`df_used_percent
                Adding required metric: fs`/run/shm`df_used_inode_percent
            Loading required metrics from /opt/circonus/cosi/registration/registration-graph-fs-0-_run_user.json
                Adding required metric: fs`/run/user`df_used_percent
                Adding required metric: fs`/run/user`df_used_inode_percent
            Loading required metrics from /opt/circonus/cosi/registration/registration-graph-fs-0-_sys_fs_cgroup.json
                Adding required metric: fs`/sys/fs/cgroup`df_used_percent
                Adding required metric: fs`/sys/fs/cgroup`df_used_inode_percent
            Loading required metrics from /opt/circonus/cosi/registration/registration-graph-fs-0-_var_lib_postgresql_9_4_main.json
                Adding required metric: fs`/var/lib/postgresql/9.4/main`df_used_percent
                Adding required metric: fs`/var/lib/postgresql/9.4/main`df_used_inode_percent
            Loading required metrics from /opt/circonus/cosi/registration/registration-graph-fs-0-_var_log_postgres.json
                Adding required metric: fs`/var/log/postgres`df_used_percent
                Adding required metric: fs`/var/log/postgres`df_used_inode_percent
            Loading required metrics from /opt/circonus/cosi/registration/registration-graph-if-0-eth0.json
                Adding required metric: if`eth0`in_bytes
                Adding required metric: if`eth0`out_bytes
            Loading required metrics from /opt/circonus/cosi/registration/registration-graph-if-0-eth1.json
                Adding required metric: if`eth1`in_bytes
                Adding required metric: if`eth1`out_bytes
            Loading required metrics from /opt/circonus/cosi/registration/registration-graph-if-1-eth0.json
                Adding required metric: if`eth0`in_errors
                Adding required metric: if`eth0`out_errors
            Loading required metrics from /opt/circonus/cosi/registration/registration-graph-if-1-eth1.json
                Adding required metric: if`eth1`in_errors
                Adding required metric: if`eth1`out_errors
            Loading required metrics from /opt/circonus/cosi/registration/registration-graph-pg_bgwriter-0.json
                Adding required metric: pg_bgwriter`buffers_allocated
                Adding required metric: pg_bgwriter`buffers_at_checkpoint
                Adding required metric: pg_bgwriter`buffers_by_backend
                Adding required metric: pg_bgwriter`buffers_cleaned
            Loading required metrics from /opt/circonus/cosi/registration/registration-graph-pg_cache-0-postgres.json
                Adding required metric: pg_cache`postgres`disk_bytes_read
                Adding required metric: pg_cache`postgres`cache_bytes_read
            Loading required metrics from /opt/circonus/cosi/registration/registration-graph-pg_connections-0.json
                Adding required metric: pg_connections`max_connections
                Adding required metric: pg_connections`active
            Loading required metrics from /opt/circonus/cosi/registration/registration-graph-pg_db_size-0-template0.json
                Adding required metric: pg_db_size`template0
                Ignoring C:AQL statement: metric:average("2454d2d8-87c5-e6ce-922a-8b8ca9cb3d9f","pg_db_size`template0") | forecasting:dewma(0.2, 0.001, fill=2)
            Loading required metrics from /opt/circonus/cosi/registration/registration-graph-pg_db_size-0-template1.json
                Adding required metric: pg_db_size`template1
                Ignoring C:AQL statement: metric:average("2454d2d8-87c5-e6ce-922a-8b8ca9cb3d9f","pg_db_size`template1") | forecasting:dewma(0.2, 0.001, fill=2)
            Loading required metrics from /opt/circonus/cosi/registration/registration-graph-pg_locks-0.json
                Adding required metric: pg_locks`exclusive
                Adding required metric: pg_locks`total
                Adding required metric: pg_locks`waiting
            Loading required metrics from /opt/circonus/cosi/registration/registration-graph-pg_table_stats-0.json
                Adding required metric: pg_table_stats`inserts
                Adding required metric: pg_table_stats`updates
                Adding required metric: pg_table_stats`deletes
            Loading required metrics from /opt/circonus/cosi/registration/registration-graph-pg_table_stats-1.json
                Adding required metric: pg_table_stats`index_scans
                Adding required metric: pg_table_stats`index_tup_fetch
                Adding required metric: pg_table_stats`seq_scans
                Adding required metric: pg_table_stats`seq_tup_read
            Loading required metrics from /opt/circonus/cosi/registration/registration-graph-pg_transactions-0.json
                Adding required metric: pg_transactions`commits
            Loading required metrics from /opt/circonus/cosi/registration/registration-graph-postgres_protocol_observer-0.json
                Ignoring C:AQL statement: metric:histogram("2454d2d8-87c5-e6ce-922a-8b8ca9cb3d9f","postgres_protocol_observer`Execute`latency") | histogram:rate()
                Ignoring C:AQL statement: metric:histogram("2454d2d8-87c5-e6ce-922a-8b8ca9cb3d9f","postgres_protocol_observer`Execute`latency") | histogram:percentile(0,25,50,75,100)
                Adding required metric: postgres_protocol_observer`Execute`latency
            Loading required metrics from /opt/circonus/cosi/registration/registration-graph-postgres_protocol_observer-1.json
                Ignoring C:AQL statement: metric:histogram("2454d2d8-87c5-e6ce-922a-8b8ca9cb3d9f","postgres_protocol_observer`Query`latency") | histogram:rate()
                Ignoring C:AQL statement: metric:histogram("2454d2d8-87c5-e6ce-922a-8b8ca9cb3d9f","postgres_protocol_observer`Query`latency") | histogram:percentile(0,25,50,75,100)
                Adding required metric: postgres_protocol_observer`Query`latency
            Loading required metrics from /opt/circonus/cosi/registration/registration-graph-postgres_protocol_observer-2.json
                Ignoring C:AQL statement: metric:histogram("2454d2d8-87c5-e6ce-922a-8b8ca9cb3d9f","postgres_protocol_observer`Bind`latency") | histogram:rate()
                Ignoring C:AQL statement: metric:histogram("2454d2d8-87c5-e6ce-922a-8b8ca9cb3d9f","postgres_protocol_observer`Bind`latency") | histogram:percentile(0,25,50,75,100)
                Adding required metric: postgres_protocol_observer`Bind`latency
            Loading required metrics from /opt/circonus/cosi/registration/registration-graph-vm-0.json
                Adding required metric: vm`memory`used
                Adding required metric: vm`memory`free
            Loading required metrics from /opt/circonus/cosi/registration/registration-graph-vm-1.json
                Adding required metric: vm`swap`used
                Adding required metric: vm`swap`free
            Checking metrics from visuals against currently active metrics
                Found new metric pg_transactions`commits
                Found new metric pg_cache`postgres`cache_hit_ratio
                Found new metric pg_bgwriter`buffers_allocated
                Found new metric pg_bgwriter`buffers_at_checkpoint
                Found new metric pg_bgwriter`buffers_by_backend
                Found new metric pg_bgwriter`buffers_cleaned
                Found new metric pg_cache`postgres`disk_bytes_read
                Found new metric pg_cache`postgres`cache_bytes_read
                Found new metric pg_connections`max_connections
                Found new metric pg_connections`active
                Found new metric pg_db_size`template0
                Found new metric pg_db_size`template1
                Found new metric pg_locks`exclusive
                Found new metric pg_locks`total
                Found new metric pg_locks`waiting
                Found new metric pg_table_stats`inserts
                Found new metric pg_table_stats`updates
                Found new metric pg_table_stats`deletes
                Found new metric pg_table_stats`index_scans
                Found new metric pg_table_stats`index_tup_fetch
                Found new metric pg_table_stats`seq_scans
                Found new metric pg_table_stats`seq_tup_read
                Found new metric pg_transactions`commits
                Found new metric postgres_protocol_observer`Execute`latency
                Found new metric postgres_protocol_observer`Query`latency
                Found new metric postgres_protocol_observer`Bind`latency
            Updating system check new metrics found
           ***************
           { [Error: An API occurred]
             detail:
       { explanation: 'An unexpected error has occured',
         reference: 'aa801fed62bb1c7d02ecbe681b44d39f1145f35c',
         server: 'api6il',
         tag: 'tag1c9Afb2JEcYO',
         message: 'type 4492e9320cb4f305384d392dc3e862f8880c6292',
         code: 'ServerError' } }
           ***************
           ERROR Registration exited with non-zero code 1
           STDERR: WARN Skipping graph-diskstats, no COSI template available.
           WARN Skipping graph-pg_protocol_observer, no COSI template available.
           WARN Skipping graph-pg_isready, no COSI template available.
           WARN Skipping graph-pg_repl_slots, no COSI template available.
           WARN Skipping graph-pg_repl_lag, no COSI template available.
           WARN Skipping graph-pg_partitions, no COSI template available.
           WARN Skipping graph-pg_vacuum, no COSI template available.
           WARN Skipping graph-pg_replication, no COSI template available.
           ---- End output of /opt/circonus/cosi/bin/cosi-plugin-postgres --enable --database postgres --user cosi ----
           Ran /opt/circonus/cosi/bin/cosi-plugin-postgres --enable --database postgres --user cosi returned 1

           Cookbook Trace:
           ---------------
           /tmp/kitchen/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:78:in `run_action'
           /tmp/kitchen/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:106:in `block (2 levels) in converge'
           /tmp/kitchen/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:106:in `each'
           /tmp/kitchen/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:106:in `block in converge'
           /tmp/kitchen/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:105:in `converge'

           Resource Declaration:
           ---------------------
           # In /tmp/kitchen/cache/cookbooks/postgres/recipes/cosi.rb

            45:   execute 'install_cosi_postgres_plugin' do
            46:     command '/opt/circonus/cosi/bin/cosi-plugin-postgres --enable --database postgres --user cosi'
            47:   end
            48: end

           Compiled Resource:
           ------------------
           # Declared in /tmp/kitchen/cache/cookbooks/postgres/recipes/cosi.rb:45:in `from_file'

           execute("install_cosi_postgres_plugin") do
             action [:run]
             retries 0
             retry_delay 2
             default_guard_interpreter :execute
             command "/opt/circonus/cosi/bin/cosi-plugin-postgres --enable --database postgres --user cosi"
             backup 5
             returns 0
             declared_type :execute
             cookbook_name "postgres"
             recipe_name "cosi"
           end

           Platform:
           ---------
           x86_64-linux

       Running handlers:
       [2016-11-22T12:59:33+00:00] ERROR: Running exception handlers
       Running handlers complete
       [2016-11-22T12:59:33+00:00] ERROR: Exception handlers complete
       Chef Client failed. 70 resources updated in 05 minutes 41 seconds
       [2016-11-22T12:59:33+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
       [2016-11-22T12:59:33+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
       [2016-11-22T12:59:33+00:00] ERROR: execute[install_cosi_postgres_plugin] (postgres::cosi line 45) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
       ---- Begin output of /opt/circonus/cosi/bin/cosi-plugin-postgres --enable --database postgres --user cosi ----
       STDOUT: cosi-plugin-postgres v0.10.2
       ==========
       Enabling agent plugin for PostgreSQL database 'postgres'
       Verifying 'psql'
        Passed psql test
        Created plugin config
        Created protocol_observer config
        Activating PostgreSQL plugin scripts
        Enabled agent plugin for PostgreSQL
       ==========
       Configuring plugin for registration
        Sending new metrics to http://127.0.0.1:2609/write/postgres_protocol_observer
        Added new metrics for protocol_observer.
        Fetching templates for dashboard-postgres
        Saved template /opt/circonus/cosi/registration/template-dashboard-postgres-postgres.json
        Saved meta configuration
        Configuring forecast widgets
            Loading FS metrics
            Found metric 'fs`/var/lib/postgresql/9.4/main`df_used_percent'
            Found widget '{{=cosi.dashboard_instance}} file system full forecast', setting metric name
       ==========
       Updating registration

       Registration - creating checks and visuals

       Registration - setup
       ==========
       Verify Circonus API access
       API key verified for account smartb
       ==========
       Setting check target
       Reverse agent using ef7a1679-326e-4794-85b9-f59c39d9c6eb
       ==========
       Loading broker information
       Fetching broker list from Circonus
       Checking Custom configuration for default broker list
       Fetching default broker list from COSI
       ==========
       Determine default broker for json
       Checking for custom broker settings
       Checking for enterprise brokers
        52.58.25.243:43191 OK
       Found enterprise brokers, using 1231 eu-central-1
       ==========
       Determine default broker for trap
       Checking for custom broker settings
       Checking for enterprise brokers
        52.58.25.243:43191 OK
       Found enterprise brokers, using 1231 eu-central-1
       ==========
       Checking StatsD port
        StatsD disabled, skipping.
       ==========
       Save registration configuration
       Registration configuration saved /opt/circonus/cosi/registration/setup-config.json
       ==========
       Fetch available metrics from NAD
       Metrics loaded
         postgres_protocol_observer has 60 metrics
         cpu has 16 metrics
         diskstats has 319 metrics
         fs has 120 metrics
         if has 12 metrics
         vm has 56 metrics
         pg_protocol_observer has 0 metrics
         pg_isready has 1 metrics
         pg_bgwriter has 4 metrics
         pg_connections has 7 metrics
         pg_repl_slots has 0 metrics
         pg_cache has 3 metrics
         pg_repl_lag has 0 metrics
         pg_locks has 3 metrics
         pg_transactions has 3 metrics
         pg_partitions has 1 metrics
         pg_db_size has 3 metrics
         pg_table_stats has 11 metrics
         pg_vacuum has 3 metrics
         disk has 108 metrics
         pg_replication has 2 metrics
       Total metrics: 732
       Saving available metrics
       Metrics saved /opt/circonus/cosi/registration/setup-metrics.json
       ==========
       Fetching templates
       Skipping check-system, template exists, use --force to overwrite.
       Skipping worksheet-system, template exists, use --force to overwrite.
       Adding graph-postgres_protocol_observer to fetch list
       Skipping graph-cpu, template exists, use --force to overwrite.
       Adding graph-diskstats to fetch list
       Skipping graph-fs, template exists, use --force to overwrite.
       Skipping graph-if, template exists, use --force to overwrite.
       Skipping graph-vm, template exists, use --force to overwrite.
       Adding graph-pg_protocol_observer to fetch list
       Adding graph-pg_isready to fetch list
       Adding graph-pg_bgwriter to fetch list
       Adding graph-pg_connections to fetch list
       Adding graph-pg_repl_slots to fetch list
       Adding graph-pg_cache to fetch list
       Adding graph-pg_repl_lag to fetch list
       Adding graph-pg_locks to fetch list
       Adding graph-pg_transactions to fetch list
       Adding graph-pg_partitions to fetch list
       Adding graph-pg_db_size to fetch list
       Adding graph-pg_table_stats to fetch list
       Adding graph-pg_vacuum to fetch list
       Skipping graph-disk, template exists, use --force to overwrite.
       Adding graph-pg_replication to fetch list
       ---
       Fetching template(s) for: graph-postgres_protocol_observer, graph-diskstats, graph-pg_protocol_observer, graph-pg_isready, graph-pg_bgwriter, graph-pg_connections, graph-pg_repl_slots, graph-pg_cache, graph-pg_repl_lag, graph-pg_locks, graph-pg_transactions, graph-pg_partitions, graph-pg_db_size, graph-pg_table_stats, graph-pg_vacuum, graph-pg_replication
       ---
       Saved template: /opt/circonus/cosi/registration/template-graph-postgres_protocol_observer.json
       Saved template: /opt/circonus/cosi/registration/template-graph-pg_bgwriter.json
       Saved template: /opt/circonus/cosi/registration/template-graph-pg_connections.json
       Saved template: /opt/circonus/cosi/registration/template-graph-pg_cache.json
       Saved template: /opt/circonus/cosi/registration/template-graph-pg_locks.json
       Saved template: /opt/circonus/cosi/registration/template-graph-pg_transactions.json
       Saved template: /opt/circonus/cosi/registration/template-graph-pg_db_size.json
       Saved template: /opt/circonus/cosi/registration/template-graph-pg_table_stats.json
       Checked 16, fetched 8, warnings 8, errors 0

       Registration - checks
       ==========
       Configuring system check
        Check configuration already exists. /opt/circonus/cosi/registration/config-check-system.json
       ==========
       Creating system check
        Registration exists using /opt/circonus/cosi/registration/registration-check-system.json
       ==========
       Finalizing system check
        Creating NAD Reverse configuration
        Saved NAD Reverse configuration /opt/circonus/cosi/etc/circonus-nadreversesh

       Registration - graphs
       ==========
       Loading check meta data
       Loaded check meta data
       ==========
       Loading available metrics
        postgres_protocol_observer has 60 metrics
        cpu has 16 metrics
        diskstats has 319 metrics
        fs has 120 metrics
        if has 12 metrics
        vm has 56 metrics
        pg_protocol_observer has 0 metrics
        pg_isready has 1 metrics
        pg_bgwriter has 4 metrics
        pg_connections has 7 metrics
        pg_repl_slots has 0 metrics
        pg_cache has 3 metrics
        pg_repl_lag has 0 metrics
        pg_locks has 3 metrics
        pg_transactions has 3 metrics
        pg_partitions has 1 metrics
        pg_db_size has 3 metrics
        pg_table_stats has 11 metrics
        pg_vacuum has 3 metrics
        disk has 108 metrics
        pg_replication has 2 metrics
        Total metrics: 732
       Metrics loaded
       ==========
       Identifying graph templates
        Found graph-cpu template-graph-cpu.json
        Found graph-disk template-graph-disk.json
        Found graph-fs template-graph-fs.json
        Found graph-if template-graph-if.json
        Found graph-pg_bgwriter template-graph-pg_bgwriter.json
        Found graph-pg_cache template-graph-pg_cache.json
        Found graph-pg_connections template-graph-pg_connections.json
        Found graph-pg_db_size template-graph-pg_db_size.json
        Found graph-pg_locks template-graph-pg_locks.json
        Found graph-pg_table_stats template-graph-pg_table_stats.json
        Found graph-pg_transactions template-graph-pg_transactions.json
        Found graph-postgres_protocol_observer template-graph-postgres_protocol_observer.json
        Found graph-vm template-graph-vm.json
       ==========
       Configuring graphs for cpu
        Using template /opt/circonus/cosi/registration/template-graph-cpu.json
        Graph configuration already exists. /opt/circonus/cosi/registration/config-graph-cpu-0.json
       Configuring graphs for disk
        Using template /opt/circonus/cosi/registration/template-graph-disk.json
       Configuring graphs for fs
        Using template /opt/circonus/cosi/registration/template-graph-fs.json
        Graph configuration already exists. /opt/circonus/cosi/registration/config-graph-fs-0-_run.json
        Graph configuration already exists. /opt/circonus/cosi/registration/config-graph-fs-0-_.json
        Graph configuration already exists. /opt/circonus/cosi/registration/config-graph-fs-0-_sys_fs_cgroup.json
        Graph configuration already exists. /opt/circonus/cosi/registration/config-graph-fs-0-_run_lock.json
        Graph configuration already exists. /opt/circonus/cosi/registration/config-graph-fs-0-_run_shm.json
        Graph configuration already exists. /opt/circonus/cosi/registration/config-graph-fs-0-_run_user.json
        Graph configuration already exists. /opt/circonus/cosi/registration/config-graph-fs-0-_mnt.json
        Graph configuration already exists. /opt/circonus/cosi/registration/config-graph-fs-0-_postgres.json
        Graph configuration already exists. /opt/circonus/cosi/registration/config-graph-fs-0-_var_lib_postgresql_9_4_main.json
        Graph configuration already exists. /opt/circonus/cosi/registration/config-graph-fs-0-_var_log_postgres.json
       Configuring graphs for if
        Using template /opt/circonus/cosi/registration/template-graph-if.json
        Graph configuration already exists. /opt/circonus/cosi/registration/config-graph-if-0-eth0.json
        Graph configuration already exists. /opt/circonus/cosi/registration/config-graph-if-0-eth1.json
        Graph configuration already exists. /opt/circonus/cosi/registration/config-graph-if-1-eth0.json
        Graph configuration already exists. /opt/circonus/cosi/registration/config-graph-if-1-eth1.json
       Configuring graphs for pg_bgwriter
        Using template /opt/circonus/cosi/registration/template-graph-pg_bgwriter.json
        Creating graph 0 config for pg_bgwriter
        Applying custom config options and interpolating templates
        Interpolating title {{=cosi.host_name}} Postgres Bgwriters
        Interpolating description Postgres bgwriter info
        Saved config /opt/circonus/cosi/registration/config-graph-pg_bgwriter-0.json
       Configuring graphs for pg_cache
        Using template /opt/circonus/cosi/registration/template-graph-pg_cache.json
        Creating graph 0 config for pg_cache.postgres
        Applying custom config options and interpolating templates
        Interpolating title {{=cosi.host_name}} {{=cosi.graph_item}} Postgres Cache
        Interpolating description Postgres {{=cosi.graph_item}} cache info
        Saved config /opt/circonus/cosi/registration/config-graph-pg_cache-0-postgres.json
       Configuring graphs for pg_connections
        Using template /opt/circonus/cosi/registration/template-graph-pg_connections.json
        Creating graph 0 config for pg_connections
        Applying custom config options and interpolating templates
        Interpolating title {{=cosi.host_name}} Postgres Connections
        Interpolating description Postgres connections
        Saved config /opt/circonus/cosi/registration/config-graph-pg_connections-0.json
       Configuring graphs for pg_db_size
        Using template /opt/circonus/cosi/registration/template-graph-pg_db_size.json
        Creating graph 0 config for pg_db_size.template1
        Applying custom config options and interpolating templates
        Interpolating title {{=cosi.host_name}} {{=cosi.graph_item}} Postgres Database Size
        Interpolating description Postgres {{=cosi.graph_item}} database size
        Interpolating C:AQL statement metric:average("{{=cosi.check_uuid}}","pg_db_size`{{=cosi.graph_item}}") | forecasting:dewma(0.2, 0.001, fill=2) for metric null
        Saved config /opt/circonus/cosi/registration/config-graph-pg_db_size-0-template1.json
        Creating graph 0 config for pg_db_size.template0
        Applying custom config options and interpolating templates
        Interpolating title {{=cosi.host_name}} {{=cosi.graph_item}} Postgres Database Size
        Interpolating description Postgres {{=cosi.graph_item}} database size
        Interpolating C:AQL statement metric:average("{{=cosi.check_uuid}}","pg_db_size`{{=cosi.graph_item}}") | forecasting:dewma(0.2, 0.001, fill=2) for metric null
        Saved config /opt/circonus/cosi/registration/config-graph-pg_db_size-0-template0.json
       Configuring graphs for pg_locks
        Using template /opt/circonus/cosi/registration/template-graph-pg_locks.json
        Creating graph 0 config for pg_locks
        Applying custom config options and interpolating templates
        Interpolating title {{=cosi.host_name}} Postgres Locks
        Interpolating description Postgres lock info
        Saved config /opt/circonus/cosi/registration/config-graph-pg_locks-0.json
       Configuring graphs for pg_table_stats
        Using template /opt/circonus/cosi/registration/template-graph-pg_table_stats.json
        Creating graph 0 config for pg_table_stats
        Applying custom config options and interpolating templates
        Interpolating title {{=cosi.host_name}} table stats
        Interpolating description
        Saved config /opt/circonus/cosi/registration/config-graph-pg_table_stats-0.json
        Creating graph 1 config for pg_table_stats
        Applying custom config options and interpolating templates
        Interpolating title circonus seq/index scans
        Interpolating description
        Saved config /opt/circonus/cosi/registration/config-graph-pg_table_stats-1.json
       Configuring graphs for pg_transactions
        Using template /opt/circonus/cosi/registration/template-graph-pg_transactions.json
        Creating graph 0 config for pg_transactions
        Applying custom config options and interpolating templates
        Interpolating title {{=cosi.host_name}} Postgres Commits
        Interpolating description Postgres commits
        Saved config /opt/circonus/cosi/registration/config-graph-pg_transactions-0.json
       Configuring graphs for postgres_protocol_observer
        Using template /opt/circonus/cosi/registration/template-graph-postgres_protocol_observer.json
        Creating graph 0 config for postgres_protocol_observer
        Applying custom config options and interpolating templates
        Interpolating title {{=cosi.host_name}} Postgres Execute Latency
        Interpolating description Postgres Execute Latency
        Interpolating C:AQL statement metric:histogram("{{=cosi.check_uuid}}","postgres_protocol_observer`Execute`latency") | histogram:rate() for metric null
        Interpolating C:AQL statement metric:histogram("{{=cosi.check_uuid}}","postgres_protocol_observer`Execute`latency") | histogram:percentile(0,25,50,75,100) for metric null
        Saved config /opt/circonus/cosi/registration/config-graph-postgres_protocol_observer-0.json
        Creating graph 1 config for postgres_protocol_observer
        Applying custom config options and interpolating templates
        Interpolating title {{=cosi.host_name}} Postgres Query Latency
        Interpolating description Postgres Query Latency
        Interpolating C:AQL statement metric:histogram("{{=cosi.check_uuid}}","postgres_protocol_observer`Query`latency") | histogram:rate() for metric null
        Interpolating C:AQL statement metric:histogram("{{=cosi.check_uuid}}","postgres_protocol_observer`Query`latency") | histogram:percentile(0,25,50,75,100) for metric null
        Saved config /opt/circonus/cosi/registration/config-graph-postgres_protocol_observer-1.json
        Creating graph 2 config for postgres_protocol_observer
        Applying custom config options and interpolating templates
        Interpolating title {{=cosi.host_name}} Postgres Bound Query Latency
        Interpolating description Postgres Bind Latency
        Interpolating C:AQL statement metric:histogram("{{=cosi.check_uuid}}","postgres_protocol_observer`Bind`latency") | histogram:rate() for metric null
        Interpolating C:AQL statement metric:histogram("{{=cosi.check_uuid}}","postgres_protocol_observer`Bind`latency") | histogram:percentile(0,25,50,75,100) for metric null
        Saved config /opt/circonus/cosi/registration/config-graph-postgres_protocol_observer-2.json
       Configuring graphs for vm
        Using template /opt/circonus/cosi/registration/template-graph-vm.json
        Graph configuration already exists. /opt/circonus/cosi/registration/config-graph-vm-0.json
        Graph configuration already exists. /opt/circonus/cosi/registration/config-graph-vm-1.json
       ==========
       Creating graph /opt/circonus/cosi/registration/config-graph-cpu-0.json
        Registration exists using /opt/circonus/cosi/registration/registration-graph-cpu-0.json
       ==========
       Creating graph /opt/circonus/cosi/registration/config-graph-fs-0-_.json
        Registration exists using /opt/circonus/cosi/registration/registration-graph-fs-0-_.json
       ==========
       Creating graph /opt/circonus/cosi/registration/config-graph-fs-0-_mnt.json
        Registration exists using /opt/circonus/cosi/registration/registration-graph-fs-0-_mnt.json
       ==========
       Creating graph /opt/circonus/cosi/registration/config-graph-fs-0-_postgres.json
        Registration exists using /opt/circonus/cosi/registration/registration-graph-fs-0-_postgres.json
       ==========
       Creating graph /opt/circonus/cosi/registration/config-graph-fs-0-_run.json
        Registration exists using /opt/circonus/cosi/registration/registration-graph-fs-0-_run.json
       ==========
       Creating graph /opt/circonus/cosi/registration/config-graph-fs-0-_run_lock.json
        Registration exists using /opt/circonus/cosi/registration/registration-graph-fs-0-_run_lock.json
       ==========
       Creating graph /opt/circonus/cosi/registration/config-graph-fs-0-_run_shm.json
        Registration exists using /opt/circonus/cosi/registration/registration-graph-fs-0-_run_shm.json
       ==========
       Creating graph /opt/circonus/cosi/registration/config-graph-fs-0-_run_user.json
        Registration exists using /opt/circonus/cosi/registration/registration-graph-fs-0-_run_user.json
       ==========
       Creating graph /opt/circonus/cosi/registration/config-graph-fs-0-_sys_fs_cgroup.json
        Registration exists using /opt/circonus/cosi/registration/registration-graph-fs-0-_sys_fs_cgroup.json
       ==========
       Creating graph /opt/circonus/cosi/registration/config-graph-fs-0-_var_lib_postgresql_9_4_main.json
        Registration exists using /opt/circonus/cosi/registration/registration-graph-fs-0-_var_lib_postgresql_9_4_main.json
       ==========
       Creating graph /opt/circonus/cosi/registration/config-graph-fs-0-_var_log_postgres.json
        Registration exists using /opt/circonus/cosi/registration/registration-graph-fs-0-_var_log_postgres.json
       ==========
       Creating graph /opt/circonus/cosi/registration/config-graph-if-0-eth0.json
        Registration exists using /opt/circonus/cosi/registration/registration-graph-if-0-eth0.json
       ==========
       Creating graph /opt/circonus/cosi/registration/config-graph-if-0-eth1.json
        Registration exists using /opt/circonus/cosi/registration/registration-graph-if-0-eth1.json
       ==========
       Creating graph /opt/circonus/cosi/registration/config-graph-if-1-eth0.json
        Registration exists using /opt/circonus/cosi/registration/registration-graph-if-1-eth0.json
       ==========
       Creating graph /opt/circonus/cosi/registration/config-graph-if-1-eth1.json
        Registration exists using /opt/circonus/cosi/registration/registration-graph-if-1-eth1.json
       ==========
       Creating graph /opt/circonus/cosi/registration/config-graph-pg_bgwriter-0.json
        Sending graph configuration to Circonus API
        Saving registration /opt/circonus/cosi/registration/registration-graph-pg_bgwriter-0.json
        Graph created: https://smartb.circonus.com/trending/graphs/view/797d4fad-fbe5-68f5-a056-bab009e4160d
       ==========
       Creating graph /opt/circonus/cosi/registration/config-graph-pg_cache-0-postgres.json
        Sending graph configuration to Circonus API
        Saving registration /opt/circonus/cosi/registration/registration-graph-pg_cache-0-postgres.json
        Graph created: https://smartb.circonus.com/trending/graphs/view/57532b2e-f437-c644-95b4-eccd9a3b0fc6
       ==========
       Creating graph /opt/circonus/cosi/registration/config-graph-pg_connections-0.json
        Sending graph configuration to Circonus API
        Saving registration /opt/circonus/cosi/registration/registration-graph-pg_connections-0.json
        Graph created: https://smartb.circonus.com/trending/graphs/view/cfe01ea8-c4af-e407-bd26-c680b2279013
       ==========
       Creating graph /opt/circonus/cosi/registration/config-graph-pg_db_size-0-template0.json
        Sending graph configuration to Circonus API
        Saving registration /opt/circonus/cosi/registration/registration-graph-pg_db_size-0-template0.json
        Graph created: https://smartb.circonus.com/trending/graphs/view/a9efd107-7167-ee4f-bfd2-adf792a822e7
       ==========
       Creating graph /opt/circonus/cosi/registration/config-graph-pg_db_size-0-template1.json
        Sending graph configuration to Circonus API
        Saving registration /opt/circonus/cosi/registration/registration-graph-pg_db_size-0-template1.json
        Graph created: https://smartb.circonus.com/trending/graphs/view/719f79e7-34ec-ea5b-fee8-dfee91be6ed6
       ==========
       Creating graph /opt/circonus/cosi/registration/config-graph-pg_locks-0.json
        Sending graph configuration to Circonus API
        Saving registration /opt/circonus/cosi/registration/registration-graph-pg_locks-0.json
        Graph created: https://smartb.circonus.com/trending/graphs/view/7c1df9c3-ad21-6c3a-d5ea-fc559e988b0b
       ==========
       Creating graph /opt/circonus/cosi/registration/config-graph-pg_table_stats-0.json
        Sending graph configuration to Circonus API
        Saving registration /opt/circonus/cosi/registration/registration-graph-pg_table_stats-0.json
        Graph created: https://smartb.circonus.com/trending/graphs/view/6694cfa2-5fad-6647-cc9b-bdfaae7fda37
       ==========
       Creating graph /opt/circonus/cosi/registration/config-graph-pg_table_stats-1.json
        Sending graph configuration to Circonus API
        Saving registration /opt/circonus/cosi/registration/registration-graph-pg_table_stats-1.json
        Graph created: https://smartb.circonus.com/trending/graphs/view/3bd7eb61-7010-ccaf-ea05-d5ffa66a6635
       ==========
       Creating graph /opt/circonus/cosi/registration/config-graph-pg_transactions-0.json
        Sending graph configuration to Circonus API
        Saving registration /opt/circonus/cosi/registration/registration-graph-pg_transactions-0.json
        Graph created: https://smartb.circonus.com/trending/graphs/view/f509ad5f-88ad-4362-afe2-894944a9e542
       ==========
       Creating graph /opt/circonus/cosi/registration/config-graph-postgres_protocol_observer-0.json
        Sending graph configuration to Circonus API
        Saving registration /opt/circonus/cosi/registration/registration-graph-postgres_protocol_observer-0.json
        Graph created: https://smartb.circonus.com/trending/graphs/view/e0f62d27-ef76-cbbe-90c0-b78db6652b96
       ==========
       Creating graph /opt/circonus/cosi/registration/config-graph-postgres_protocol_observer-1.json
        Sending graph configuration to Circonus API
        Saving registration /opt/circonus/cosi/registration/registration-graph-postgres_protocol_observer-1.json
        Graph created: https://smartb.circonus.com/trending/graphs/view/63454df7-fed5-62b2-d769-e7a78c7b7f76
       ==========
       Creating graph /opt/circonus/cosi/registration/config-graph-postgres_protocol_observer-2.json
        Sending graph configuration to Circonus API
        Saving registration /opt/circonus/cosi/registration/registration-graph-postgres_protocol_observer-2.json
        Graph created: https://smartb.circonus.com/trending/graphs/view/cc2cf25a-855b-40b4-cec4-efe3094cf079
       ==========
       Creating graph /opt/circonus/cosi/registration/config-graph-vm-0.json
        Registration exists using /opt/circonus/cosi/registration/registration-graph-vm-0.json
       ==========
       Creating graph /opt/circonus/cosi/registration/config-graph-vm-1.json
        Registration exists using /opt/circonus/cosi/registration/registration-graph-vm-1.json

       Registration - worksheets
       ==========
       Configuring Worksheets
        Worksheet configuration already exists /opt/circonus/cosi/registration/config-worksheet-system.json
       ==========
       Creating Worksheets
        Registration exists using /opt/circonus/cosi/registration/registration-worksheet-system.json

       Registration - dashboards
       ==========
       Loading check meta data
       Loaded check meta data
       ==========
       Identifying dashboard templates
        Found dashboard-postgres template-dashboard-postgres-postgres.json
       Loaded 1 template(s)
       ==========
       Loading available metrics
        postgres_protocol_observer has 60 metrics
        cpu has 16 metrics
        diskstats has 319 metrics
        fs has 120 metrics
        if has 12 metrics
        vm has 56 metrics
        pg_protocol_observer has 0 metrics
        pg_isready has 1 metrics
        pg_bgwriter has 4 metrics
        pg_connections has 7 metrics
        pg_repl_slots has 0 metrics
        pg_cache has 3 metrics
        pg_repl_lag has 0 metrics
        pg_locks has 3 metrics
        pg_transactions has 3 metrics
        pg_partitions has 1 metrics
        pg_db_size has 3 metrics
        pg_table_stats has 11 metrics
        pg_vacuum has 3 metrics
        disk has 108 metrics
        pg_replication has 2 metrics
        Total metrics: 732
       Metrics loaded
       ==========
       Loading graphs
        Extracting meta data from registration-graph-cpu-0.json
        Extracting meta data from registration-graph-fs-0-_.json
        Extracting meta data from registration-graph-fs-0-_mnt.json
        Extracting meta data from registration-graph-fs-0-_postgres.json
        Extracting meta data from registration-graph-fs-0-_run.json
        Extracting meta data from registration-graph-fs-0-_run_lock.json
        Extracting meta data from registration-graph-fs-0-_run_shm.json
        Extracting meta data from registration-graph-fs-0-_run_user.json
        Extracting meta data from registration-graph-fs-0-_sys_fs_cgroup.json
        Extracting meta data from registration-graph-fs-0-_var_lib_postgresql_9_4_main.json
        Extracting meta data from registration-graph-fs-0-_var_log_postgres.json
        Extracting meta data from registration-graph-if-0-eth0.json
        Extracting meta data from registration-graph-if-0-eth1.json
        Extracting meta data from registration-graph-if-1-eth0.json
        Extracting meta data from registration-graph-if-1-eth1.json
        Extracting meta data from registration-graph-pg_bgwriter-0.json
        Extracting meta data from registration-graph-pg_cache-0-postgres.json
        Extracting meta data from registration-graph-pg_connections-0.json
        Extracting meta data from registration-graph-pg_db_size-0-template0.json
        Extracting meta data from registration-graph-pg_db_size-0-template1.json
        Extracting meta data from registration-graph-pg_locks-0.json
        Extracting meta data from registration-graph-pg_table_stats-0.json
        Extracting meta data from registration-graph-pg_table_stats-1.json
        Extracting meta data from registration-graph-pg_transactions-0.json
        Extracting meta data from registration-graph-postgres_protocol_observer-0.json
        Extracting meta data from registration-graph-postgres_protocol_observer-1.json
        Extracting meta data from registration-graph-postgres_protocol_observer-2.json
        Extracting meta data from registration-graph-vm-0.json
        Extracting meta data from registration-graph-vm-1.json
       Loaded meta data from 29 graphs
       Configuring dasbhoards for 1 template(s)
       ==========
       Configuring dasbhoard
        Dashboard: postgres-postgres (/opt/circonus/cosi/registration/template-dashboard-postgres-postgres.json)
        Using meta data from /opt/circonus/cosi/registration/meta-dashboard-postgres-postgres.json
        Interpolating title Postgres {{=cosi.dashboard_instance}}
        Configuring graph widgets
        Configuring gauge widgets
        Configuring forecast widgets
            Configured forecast widget 'postgres file system full forecast'
        Purging unconfigured widgets
        Saved configuration /opt/circonus/cosi/registration/config-dashboard-postgres-postgres.json
       ==========
       Creating dashboard /opt/circonus/cosi/registration/config-dashboard-postgres-postgres.json
        Sending dashboard configuration to Circonus API
        Saving registration /opt/circonus/cosi/registration/registration-dashboard-postgres-postgres.json
        Dashboard created: https://smartb.circonus.com/dashboards/view/4eebe3b2-f3b7-c82c-ede9-f8df5294d82d
       ==========
       Updating system check
        Registration found using /opt/circonus/cosi/registration/registration-check-system.json
       Collecting required metrics from registered visuals
        Loading required metrics from /opt/circonus/cosi/registration/registration-dashboard-postgres-postgres.json
            Adding required metric: pg_transactions`commits
            Adding required metric: pg_cache`postgres`cache_hit_ratio
        Loading required metrics from /opt/circonus/cosi/registration/registration-graph-cpu-0.json
            Adding required metric: cpu`idle
            Adding required metric: cpu`intr
            Adding required metric: cpu`kernel
            Adding required metric: cpu`user
            Adding required metric: cpu`wait_io
        Loading required metrics from /opt/circonus/cosi/registration/registration-graph-fs-0-_.json
            Adding required metric: fs`/`df_used_percent
            Adding required metric: fs`/`df_used_inode_percent
        Loading required metrics from /opt/circonus/cosi/registration/registration-graph-fs-0-_mnt.json
            Adding required metric: fs`/mnt`df_used_percent
            Adding required metric: fs`/mnt`df_used_inode_percent
        Loading required metrics from /opt/circonus/cosi/registration/registration-graph-fs-0-_postgres.json
            Adding required metric: fs`/postgres`df_used_percent
            Adding required metric: fs`/postgres`df_used_inode_percent
        Loading required metrics from /opt/circonus/cosi/registration/registration-graph-fs-0-_run.json
            Adding required metric: fs`/run`df_used_percent
            Adding required metric: fs`/run`df_used_inode_percent
        Loading required metrics from /opt/circonus/cosi/registration/registration-graph-fs-0-_run_lock.json
            Adding required metric: fs`/run/lock`df_used_percent
            Adding required metric: fs`/run/lock`df_used_inode_percent
        Loading required metrics from /opt/circonus/cosi/registration/registration-graph-fs-0-_run_shm.json
            Adding required metric: fs`/run/shm`df_used_percent
            Adding required metric: fs`/run/shm`df_used_inode_percent
        Loading required metrics from /opt/circonus/cosi/registration/registration-graph-fs-0-_run_user.json
            Adding required metric: fs`/run/user`df_used_percent
            Adding required metric: fs`/run/user`df_used_inode_percent
        Loading required metrics from /opt/circonus/cosi/registration/registration-graph-fs-0-_sys_fs_cgroup.json
            Adding required metric: fs`/sys/fs/cgroup`df_used_percent
            Adding required metric: fs`/sys/fs/cgroup`df_used_inode_percent
        Loading required metrics from /opt/circonus/cosi/registration/registration-graph-fs-0-_var_lib_postgresql_9_4_main.json
            Adding required metric: fs`/var/lib/postgresql/9.4/main`df_used_percent
            Adding required metric: fs`/var/lib/postgresql/9.4/main`df_used_inode_percent
        Loading required metrics from /opt/circonus/cosi/registration/registration-graph-fs-0-_var_log_postgres.json
            Adding required metric: fs`/var/log/postgres`df_used_percent
            Adding required metric: fs`/var/log/postgres`df_used_inode_percent
        Loading required metrics from /opt/circonus/cosi/registration/registration-graph-if-0-eth0.json
            Adding required metric: if`eth0`in_bytes
            Adding required metric: if`eth0`out_bytes
        Loading required metrics from /opt/circonus/cosi/registration/registration-graph-if-0-eth1.json
            Adding required metric: if`eth1`in_bytes
            Adding required metric: if`eth1`out_bytes
        Loading required metrics from /opt/circonus/cosi/registration/registration-graph-if-1-eth0.json
            Adding required metric: if`eth0`in_errors
            Adding required metric: if`eth0`out_errors
        Loading required metrics from /opt/circonus/cosi/registration/registration-graph-if-1-eth1.json
            Adding required metric: if`eth1`in_errors
            Adding required metric: if`eth1`out_errors
        Loading required metrics from /opt/circonus/cosi/registration/registration-graph-pg_bgwriter-0.json
            Adding required metric: pg_bgwriter`buffers_allocated
            Adding required metric: pg_bgwriter`buffers_at_checkpoint
            Adding required metric: pg_bgwriter`buffers_by_backend
            Adding required metric: pg_bgwriter`buffers_cleaned
        Loading required metrics from /opt/circonus/cosi/registration/registration-graph-pg_cache-0-postgres.json
            Adding required metric: pg_cache`postgres`disk_bytes_read
            Adding required metric: pg_cache`postgres`cache_bytes_read
        Loading required metrics from /opt/circonus/cosi/registration/registration-graph-pg_connections-0.json
            Adding required metric: pg_connections`max_connections
            Adding required metric: pg_connections`active
        Loading required metrics from /opt/circonus/cosi/registration/registration-graph-pg_db_size-0-template0.json
            Adding required metric: pg_db_size`template0
            Ignoring C:AQL statement: metric:average("2454d2d8-87c5-e6ce-922a-8b8ca9cb3d9f","pg_db_size`template0") | forecasting:dewma(0.2, 0.001, fill=2)
        Loading required metrics from /opt/circonus/cosi/registration/registration-graph-pg_db_size-0-template1.json
            Adding required metric: pg_db_size`template1
            Ignoring C:AQL statement: metric:average("2454d2d8-87c5-e6ce-922a-8b8ca9cb3d9f","pg_db_size`template1") | forecasting:dewma(0.2, 0.001, fill=2)
        Loading required metrics from /opt/circonus/cosi/registration/registration-graph-pg_locks-0.json
            Adding required metric: pg_locks`exclusive
            Adding required metric: pg_locks`total
            Adding required metric: pg_locks`waiting
        Loading required metrics from /opt/circonus/cosi/registration/registration-graph-pg_table_stats-0.json
            Adding required metric: pg_table_stats`inserts
            Adding required metric: pg_table_stats`updates
            Adding required metric: pg_table_stats`deletes
        Loading required metrics from /opt/circonus/cosi/registration/registration-graph-pg_table_stats-1.json
            Adding required metric: pg_table_stats`index_scans
            Adding required metric: pg_table_stats`index_tup_fetch
            Adding required metric: pg_table_stats`seq_scans
            Adding required metric: pg_table_stats`seq_tup_read
        Loading required metrics from /opt/circonus/cosi/registration/registration-graph-pg_transactions-0.json
            Adding required metric: pg_transactions`commits
        Loading required metrics from /opt/circonus/cosi/registration/registration-graph-postgres_protocol_observer-0.json
            Ignoring C:AQL statement: metric:histogram("2454d2d8-87c5-e6ce-922a-8b8ca9cb3d9f","postgres_protocol_observer`Execute`latency") | histogram:rate()
            Ignoring C:AQL statement: metric:histogram("2454d2d8-87c5-e6ce-922a-8b8ca9cb3d9f","postgres_protocol_observer`Execute`latency") | histogram:percentile(0,25,50,75,100)
            Adding required metric: postgres_protocol_observer`Execute`latency
        Loading required metrics from /opt/circonus/cosi/registration/registration-graph-postgres_protocol_observer-1.json
            Ignoring C:AQL statement: metric:histogram("2454d2d8-87c5-e6ce-922a-8b8ca9cb3d9f","postgres_protocol_observer`Query`latency") | histogram:rate()
            Ignoring C:AQL statement: metric:histogram("2454d2d8-87c5-e6ce-922a-8b8ca9cb3d9f","postgres_protocol_observer`Query`latency") | histogram:percentile(0,25,50,75,100)
            Adding required metric: postgres_protocol_observer`Query`latency
        Loading required metrics from /opt/circonus/cosi/registration/registration-graph-postgres_protocol_observer-2.json
            Ignoring C:AQL statement: metric:histogram("2454d2d8-87c5-e6ce-922a-8b8ca9cb3d9f","postgres_protocol_observer`Bind`latency") | histogram:rate()
            Ignoring C:AQL statement: metric:histogram("2454d2d8-87c5-e6ce-922a-8b8ca9cb3d9f","postgres_protocol_observer`Bind`latency") | histogram:percentile(0,25,50,75,100)
            Adding required metric: postgres_protocol_observer`Bind`latency
        Loading required metrics from /opt/circonus/cosi/registration/registration-graph-vm-0.json
            Adding required metric: vm`memory`used
            Adding required metric: vm`memory`free
        Loading required metrics from /opt/circonus/cosi/registration/registration-graph-vm-1.json
            Adding required metric: vm`swap`used
            Adding required metric: vm`swap`free
        Checking metrics from visuals against currently active metrics
            Found new metric pg_transactions`commits
            Found new metric pg_cache`postgres`cache_hit_ratio
            Found new metric pg_bgwriter`buffers_allocated
            Found new metric pg_bgwriter`buffers_at_checkpoint
            Found new metric pg_bgwriter`buffers_by_backend
            Found new metric pg_bgwriter`buffers_cleaned
            Found new metric pg_cache`postgres`disk_bytes_read
            Found new metric pg_cache`postgres`cache_bytes_read
            Found new metric pg_connections`max_connections
            Found new metric pg_connections`active
            Found new metric pg_db_size`template0
            Found new metric pg_db_size`template1
            Found new metric pg_locks`exclusive
            Found new metric pg_locks`total
            Found new metric pg_locks`waiting
            Found new metric pg_table_stats`inserts
            Found new metric pg_table_stats`updates
            Found new metric pg_table_stats`deletes
            Found new metric pg_table_stats`index_scans
            Found new metric pg_table_stats`index_tup_fetch
            Found new metric pg_table_stats`seq_scans
            Found new metric pg_table_stats`seq_tup_read
            Found new metric pg_transactions`commits
            Found new metric postgres_protocol_observer`Execute`latency
            Found new metric postgres_protocol_observer`Query`latency
            Found new metric postgres_protocol_observer`Bind`latency
        Updating system check new metrics found
       ***************
       { [Error: An API occurred]
         detail:
          { explanation: 'An unexpected error has occured',
            reference: 'aa801fed62bb1c7d02ecbe681b44d39f1145f35c',
            server: 'api6il',
            tag: 'tag1c9Afb2JEcYO',
            message: 'type 4492e9320cb4f305384d392dc3e862f8880c6292',
            code: 'ServerError' } }
       ***************
       ERROR Registration exited with non-zero code 1
       STDERR: WARN Skipping graph-diskstats, no COSI template available.
       WARN Skipping graph-pg_protocol_observer, no COSI template available.
       WARN Skipping graph-pg_isready, no COSI template available.
       WARN Skipping graph-pg_repl_slots, no COSI template available.
       WARN Skipping graph-pg_repl_lag, no COSI template available.
       WARN Skipping graph-pg_partitions, no COSI template available.
       WARN Skipping graph-pg_vacuum, no COSI template available.
       WARN Skipping graph-pg_replication, no COSI template available.
       ---- End output of /opt/circonus/cosi/bin/cosi-plugin-postgres --enable --database postgres --user cosi ----
       Ran /opt/circonus/cosi/bin/cosi-plugin-postgres --enable --database postgres --user cosi returned 1