Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- > pwd
- /etc/puppetlabs/puppetdb
- > netstat -tunlep | grep 5432
- tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 492 98017 15770/postmaster
- > grep -i 5432 -r /etc/puppetlabs/*
- /etc/puppetlabs/console-auth/database.yml: port: 5432
- /etc/puppetlabs/installer/database_info.install:q_database_port=5432
- /etc/puppetlabs/installer/answers.install:q_database_port=5432
- /etc/puppetlabs/puppet-dashboard/database.yml: port: 5432
- /etc/puppetlabs/puppetdb/conf.d/database.ini:subname = //makeittotop-gmail-com2.mylabserver.com:5432/pe-puppetdb
- /etc/puppetlabs/rubycas-server/config.yml: port: 5432
- /etc/puppetlabs/rubycas-server/config.yml: port: 5432
- > cat conf.d/database.ini
- [database]
- # For the embedded DB: org.hsqldb.jdbcDriver
- # For PostgreSQL: org.postgresql.Driver
- # Defaults to embedded DB
- classname = org.postgresql.Driver
- # For the embedded DB: hsqldb
- # For PostgreSQL: postgresql
- # Defaults to embedded DB
- subprotocol = postgresql
- # For the embedded DB: file:/path/to/database;hsqldb.tx=mvcc;sql.syntax_pgs=true
- # For PostgreSQL: //host:port/databaseName
- # Defaults to embedded DB located in <vardir>/db
- subname = //makeittotop-gmail-com2.mylabserver.com:5432/pe-puppetdb
- # Connect as a specific user
- # username = foobar
- username = pe-puppetdb
- # Use a specific password
- # password = foobar
- password = m38RUmh6TSewBshB30Be-Q
- # How often (in minutes) to compact the database
- # gc-interval = 60
- gc-interval = 60
- # Number of seconds before any SQL query is considered 'slow'; offending
- # queries will not be interrupted, but will be logged at the WARN log level.
- log-slow-statements = 10
- syntax_pgs = true
- node-ttl = 7d
- node-purge-ttl = 0s
- report-ttl = 14d
- > psql -h localhost -p 5432 -U pe-puppetdb
- Password for user pe-puppetdb:
- psql (8.4.20, server 9.2.7)
- WARNING: psql version 8.4, server version 9.2.
- Some psql features might not work.
- Type "help" for help.
- pe-puppetdb=> /l
- pe-puppetdb-> ;
- ERROR: syntax error at or near "/"
- LINE 1: /l
- ^
- pe-puppetdb=> \l
- List of databases
- Name | Owner | Encoding | Collation | Ctype | Access privileges
- --------------+--------------+----------+------------+------------+---------------------------------
- console | console | UTF8 | en_US.utf8 | en_US.utf8 |
- console_auth | console_auth | UTF8 | en_US.utf8 | en_US.utf8 |
- pe-postgres | pe-postgres | UTF8 | en_US.UTF8 | en_US.UTF8 |
- pe-puppetdb | pe-puppetdb | UTF8 | en_US.utf8 | en_US.utf8 |
- template0 | pe-postgres | UTF8 | en_US.UTF8 | en_US.UTF8 | =c/"pe-postgres"
- : "pe-postgres"=CTc/"pe-postgres"
- template1 | pe-postgres | UTF8 | en_US.UTF8 | en_US.UTF8 | =c/"pe-postgres"
- : "pe-postgres"=CTc/"pe-postgres"
- (6 rows)
- pe-puppetdb=> \c pe-puppetdb
- psql (8.4.20, server 9.2.7)
- WARNING: psql version 8.4, server version 9.2.
- Some psql features might not work.
- You are now connected to database "pe-puppetdb".
- pe-puppetdb=> \dt
- List of relations
- Schema | Name | Type | Owner
- --------+-------------------------+-------+-------------
- public | catalog_resources | table | pe-puppetdb
- public | catalogs | table | pe-puppetdb
- public | certname_facts | table | pe-puppetdb
- public | certname_facts_metadata | table | pe-puppetdb
- public | certnames | table | pe-puppetdb
- public | edges | table | pe-puppetdb
- public | latest_reports | table | pe-puppetdb
- public | reports | table | pe-puppetdb
- public | resource_events | table | pe-puppetdb
- public | resource_params | table | pe-puppetdb
- public | resource_params_cache | table | pe-puppetdb
- public | schema_migrations | table | pe-puppetdb
- (12 rows)
- pe-puppetdb=> \dt reports
- List of relations
- Schema | Name | Type | Owner
- --------+---------+-------+-------------
- public | reports | table | pe-puppetdb
- (1 row)
- pe-puppetdb=> \d reports
- Table "public.reports"
- Column | Type | Modifiers
- -----------------------+--------------------------+---------------------------------
- hash | character varying(40) | not null
- certname | text |
- puppet_version | character varying(255) | not null
- report_format | smallint | not null
- configuration_version | character varying(255) | not null
- start_time | timestamp with time zone | not null
- end_time | timestamp with time zone | not null
- receive_time | timestamp with time zone | not null
- transaction_uuid | character varying(255) | default NULL::character varying
- Indexes:
- "reports_pkey" PRIMARY KEY, btree (hash)
- "idx_reports_certname" btree (certname)
- "idx_reports_end_time" btree (end_time)
- "idx_reports_transaction_uuid" btree (transaction_uuid)
- Foreign-key constraints:
- "reports_certname_fkey" FOREIGN KEY (certname) REFERENCES certnames(name) ON DELETE CASCADE
- Referenced by:
- TABLE "latest_reports" CONSTRAINT "latest_reports_report_fkey" FOREIGN KEY (report) REFERENCES reports(hash) ON DELETE CASCADE
- TABLE "resource_events" CONSTRAINT "resource_events_report_fkey" FOREIGN KEY (report) REFERENCES reports(hash) ON DELETE CASCADE
- pe-puppetdb=> select * from certnames;
- name | deactivated
- ----------------------------------------+-------------
- makeitt-com2.labserver.com |
- (1 row)
- pe-puppetdb=>
- pe-puppetdb=> \q
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement