This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "title": "master", | |
| "services": { | |
| "filter": { | |
| "list": [], | |
| "time": { | |
| "from": "now-5m", | |
| "to": "now" | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| if [ "$#" -ne 1 ]; then | |
| echo "Takes exactly 1 arg: the resolvable name of the graphite server. Exiting..." | |
| exit 1 | |
| fi | |
| ping -c 1 $1 | |
| if [ "$?" -ne 0 ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCpatn9tN9igrSTQ5SfOgaRULxh6gOW+Ck9g0nqL8IaWxvOZ2jCCfot5914JFY0MOGt+YGUJwF1ILlwNVE8+7X3VZUxv5K5h8bDTflbNmzh1vdfvkinEmYILP4ns1zCNWutwiWsMo93A25AnsHT8+SFkKYF/ZS3g/7J9TdYlVqFeyBNoyy/viw3EfN3fNk7g6cCGOqbNxj5OvMu8SqBOLjV8iMILSzaQ8BSXdd3Gd3ntc6je3rcpL/KihTb5X1b+3yyB22ZtlhgX0DYTfN6Xpdy/EzG1tt6vpiBFE4jXGRgJ/C56yi0mj6lZZuvGTs2y9eU6rtaUaWoAlBbPHEBr08P [email protected] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class profile::ntp ($servers_array) { | |
| class { 'ntp': | |
| servers => $servers_array, | |
| } | |
| } | |
| class profile::apache { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| profile::ntp::servers_array: | |
| - pool.ntp.org | |
| - time.apple.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if $osfamily == 'RedHat' { | |
| include profile::ntp | |
| if $physicalprocessorcount > 2 { | |
| include profile::apache | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| code: 81568f7c2dcbfaa72edeb0713e60e95c17e28247 | |
| data: c6c44073e170e44b6e10ec7bfa3533e97a839a83 | |
| class: 7a5e10d9750f452431fba8813bedb2818d23dc30 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| declare -x PE_CERT=$(/opt/puppet/bin/puppet agent --configprint hostcert) | |
| declare -x PE_KEY=$(/opt/puppet/bin/puppet agent --configprint hostprivkey) | |
| declare -x PE_CA=$(/opt/puppet/bin/puppet agent --configprint localcacert) | |
| declare -x NC_CURL_OPT="-s --cacert $PE_CA --cert $PE_CERT --key $PE_KEY --insecure" | |
| curl $NC_CURL_OPT https://localhost:4433/classifier-api/v1/groups | python -m json.tool |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -k --cert /etc/puppetlabs/puppet/ssl/certs/pe-internal-dashboard.pem --key /etc/puppetlabs/puppet/ssl/private_keys/pe-internal-dashboard.pem -H "Content-Type: text/pson" https://localhost:8140/production/resource_types/class | python -mjson.tool |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| alias urlencode='python -c "import sys, urllib as ul; print ul.quote_plus(sys.argv[1])"' | |
| curl -X GET http://localhost:8080/v3/resources?query=`urlencode '["=", "type", "File"]'` | |
| # edit /etc/puppetlabs/puppet/environments/production/manifests/site.pp and add to node definition | |
| @@file { '/tmp/foo': | |
| ensure => file, | |
| content => "Hello, I'm an exported resource!\n", | |
| } | |
| curl -X GET http://localhost:8080/v3/resources?query=`urlencode '["=", "type", "File"]'` |