Skip to content

Instantly share code, notes, and snippets.

View nmattam's full-sized avatar

Nibin Abraham Mattam nmattam

View GitHub Profile
@nmattam
nmattam / gist:4660e460eb0f40eb8c43c84c79e239db
Created February 17, 2017 17:33
chef-client issue with 12.18.31
- suppressed sensitive resource
==> s_standalone: [2017-02-15T14:53:58+00:00] INFO: splunk_template[system/authentication.conf] owner changed to 501
==> s_standalone: [2017-02-15T14:53:58+00:00] INFO: splunk_template[system/authentication.conf] group changed to 501
==> s_standalone: [2017-02-15T14:53:58+00:00] INFO: splunk_template[system/authentication.conf] mode changed to 600
==> s_standalone:
==> s_standalone: - change mode from '' to '0600'
==> s_standalone:
==> s_standalone: - change owner from '' to 'splunk'
==> s_standalone:
==> s_standalone: - change group from '' to 'splunk'
==> c1_master: Running chef-client...
==> c1_master: [2017-08-10T13:50:02-05:00] WARN: Ohai::Config[:plugin_path] is set. Ohai::Config[:plugin_path] is deprecated and will be removed in future releases of ohai. Use ohai.plugin_path in your configuration file to configure :plugin_path for ohai.
==> c1_master: [2017-08-10T13:50:02-05:00] INFO: Forking chef instance to converge...
==> c1_master: Starting Chef Client, version 12.17.44
==> c1_master: [2017-08-10T13:50:02-05:00] INFO: *** Chef 12.17.44 ***
==> c1_master: [2017-08-10T13:50:02-05:00] INFO: Platform: x86_64-linux
==> c1_master: [2017-08-10T13:50:02-05:00] INFO: Chef-client pid: 4753
==> c1_master: [2017-08-10T13:50:02-05:00] WARN: Ohai::Config[:plugin_path] is set. Ohai::Config[:plugin_path] is deprecated and will be removed in future releases of ohai. Use ohai.plugin_path in your configuration file to configure :plugin_path for ohai.
==> c1_master: [2017-08-10T13:50:03-05:00] INFO: Ohai override :ipaddress to 33.33.33.11 from ["eth1", {"type"=>"eth",
==> c2_boot1: Chef Client finished, 28/51 resources updated in 01 minutes 37 seconds
==> c2_boot1: Running provisioner: shell...
c2_boot1: Running: inline script
==> c2_boot1: cat:
==> c2_boot1: /etc/splunk/password
==> c2_boot1: : No such file or directory
==> c2_boot1: WARNING: No knife configuration file found
==> c2_boot1: ERROR: Chef::Exceptions::InvalidDataBagPath: Data bag path '/var/chef/data_bags' is invalid
[splunk@master bin]$ ./splunk apply cluster-bundle --answer-yes -auth admin:527d668960fc2beb7afb8722f36a121209d5ec9372cdc7ea590be25b2836ce3853aa975e
Encountered some errors while applying the bundle.
No new bundle will be pushed. The master and peers already have this bundle with bundle id = 965BD255012CA3254ADC80A0B369B3B8
[root@master vagrant]# tail -f /opt/splunk/var/log/splunk/splunkd.log
08-15-2017 18:53:20.219 +0000 INFO SpecFiles - Found external scheme definition for stanza "powershell://" with 2 parameters: script, schedule
[vagrant@bootstrap-chef ~]$ cat /var/log/opscode/postgresql/9.2/current
2017-09-11_18:11:41.45145 LOG: database system was shut down at 2017-09-11 18:11:39 GMT
2017-09-11_18:11:41.46421 LOG: database system is ready to accept connections
2017-09-11_18:11:41.46435 LOG: autovacuum launcher started
2017-09-11_18:11:41.48142 received TERM from runit, sending INT instead to force quit connections
2017-09-11_18:11:41.48225 LOG: received fast shutdown request
2017-09-11_18:11:41.48225 LOG: aborting any active transactions
2017-09-11_18:11:41.48285 LOG: autovacuum launcher shutting down
2017-09-11_18:11:41.48296 LOG: shutting down
2017-09-11_18:11:41.48685 LOG: database system is shut down
[vagrant@secondary-chef ~]$ sudo chef-server-ctl ha-status
[OK] keepalived HA services enabled.
[OK] cluster status = master
[OK] found VIP IP address and I am master
[OK] found VRRP communications interface eth1
[OK] bookshelf is running correctly, and I am master.
[OK] keepalived is running.
[OK] nginx is running correctly, and I am master.
[OK] oc_bifrost is running correctly, and I am master.
[OK] oc_id is running correctly, and I am master.
require 'aws-sdk'
require 'net/http'
require 'nokogiri'
require 'sendgrid-ruby'
notify = ENV['notify']
sendgrid_token = ENV['SENDGRID_API_TOKEN']
# set this hash to empty so that google doesn't index these URLs from github.
M1617579:cerner_splunk na032313$ git diff
diff --git a/Vagrantfile b/Vagrantfile
index 6560d6a..75633c6 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -45,6 +45,7 @@ fail 'Non-unique ports' if @network.collect { |_, v| v[:ports].keys }.flat_map {
def default_omnibus(config)
config.omnibus.chef_version = '12'
+ config.omnibus.install_url = 'https://packages.chef.io/files/stable/chef/12.17.44/windows/2012r2/chef-client-12.17.44-1-x64.msi'
sudo killall -HUP mDNSResponder
@nmattam
nmattam / gist:bcfbc8a4ebd9a520c2ac50ab0137e58f
Last active April 4, 2022 12:09
[Splunk] Automate "Apply Changes" for Monitoring Console
# Create DMC groups
# This is basically updating the system/local/distsearch.conf
# I got all the IPs used below from /servicesNS/admin/-/search/distributed/peers. I used DNS names for search head (I had only one SH) and cluster master. So it was easy to separate the indexer IPs.
# 8089 is my API PORT
curl -k -u <user>:<password> <Monitoring Console>/services/search/distributed/groups -d name=dmc_group_search_head -d member=<search_head_member1:8089> -d member=<search_head_member2:8089> -d default=false
curl -k -u <user>:<password> <Monitoring Console>/services/search/distributed/groups -d name=dmc_group_cluster_master -d member=<cluster_master:8089> -d default=false
curl -k -u <user>:<password> <Monitoring Console>/services/search/distributed/groups -d name=dmc_group_indexer -d member=<indexer1:8089> -d member=<indexer2:8089> -d default=true # not idea why default=true for indexers
curl -k -u <user>:<password> <Monitoring Console>/services/search/distributed/groups -d name=dmc_indexerclustergroup_<CLUSTER_L