Since I keep googling these over and over.....
This file contains 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant::Config.run do |config| | |
# All Vagrant configuration is done here. The most common configuration | |
# options are documented and commented below. For a complete reference, | |
# please see the online documentation at vagrantup.com. | |
config.vm.define :core3 do |core3_config| | |
core3_config.vm.box = "core3" |
This file contains 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
[2012-09-05T16:28:18-07:00] INFO: Processing chef_gem[minitest-chef-handler] action install (minitest-handler::default line 8) | |
[2012-09-05T16:28:18-07:00] DEBUG: chef_gem[minitest-chef-handler] detected omnibus installation in /opt/chef/embedded/bin | |
[2012-09-05T16:28:18-07:00] DEBUG: chef_gem[minitest-chef-handler] using gem from running ruby environment | |
[2012-09-05T16:28:18-07:00] DEBUG: chef_gem[minitest-chef-handler] no installed version found for minitest-chef-handler (>= 0) | |
[2012-09-05T16:28:38-07:00] DEBUG: found gem minitest-chef-handler version 0.6.1 for platform ruby from http://rubygems.org/ | |
[2012-09-05T16:28:38-07:00] ERROR: chef_gem[minitest-chef-handler] (minitest-handler::default line 8) has had an error | |
[2012-09-05T16:28:38-07:00] ERROR: Running exception handlers | |
[2012-09-05T16:28:38-07:00] ERROR: Exception handlers complete | |
[2012-09-05T16:28:38-07:00] DEBUG: Re-raising exception: Gem::DependencyError - chef_gem[minitest-chef-handler] (minitest-handler::default line 8) had an error: Gem::Depe |
This file contains 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
def _commit_change(self, safe=False): | |
""" | |
A wrapper around transaction.commit so we can catch, log, retry | |
@type safe: Boolean | |
@param safe: Indicates if a safe commit is required. | |
Sometimes its OK if the commit fails. When set to false, | |
will raise an exception, instead of just logging it | |
@rtype: Boolean | |
@return: Boolean indicating result of commit attempt | |
""" |
This file contains 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
def _increment_zenpack_and_export(self): | |
""" | |
Increment the version and export the zenpack egg | |
""" | |
for pack in dmd.ZenPackManager.packs(): | |
if pack.id == self.zenpack: | |
log.debug("Previous ZenPack Version was {0}".format(pack.version)) | |
pack.version = float(pack.version) + ZENPACK_INCREMENT_STEP | |
self._commit_change() | |
log.debug("New ZenPack Version is {0}".format(pack.version)) |
This file contains 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
zenoss@ubuntu:~$ zendmd | |
Welcome to the Zenoss dmd command shell! | |
'dmd' is bound to the DataRoot. 'zhelp()' to get a list of commands. | |
Use TAB-TAB to see a list of zendmd related commands. | |
Tab completion also works for objects -- hit tab after an object name and '.' | |
(eg dmd. + tab-key). | |
>>> print version() | |
Zenoss: Zenoss 4.1.70 r26443 | |
OS: Linux (x86_64) 2.6.32 (Linux ubuntu 2.6.32-38-generic #83-Ubuntu SMP Wed Jan 4 11:12:07 UTC 2012 x86_64) | |
Zope: Zope 2.13.8 |
This file contains 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
unless Chef::Config[:solo] | |
.... | |
end |
This file contains 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
import re | |
# Lets try and reduce noise here. Since services have multiple | |
# JMX data sources, we really don't need multiple events for each data source | |
# A single event should do the trick. We are going to normalize the summary | |
# so that dedupe rules kick in | |
re_string = "^DataSource\s(?P<app_name>.*?)\s.*?;\serror connecting to server" | |
if getattr(evt, "summary", "") != "": | |
m = re.search(re_string, evt.summary) | |
if m and m.group('app_name'): | |
new_summary = "".join([m.group('app_name'), " - ", |
This file contains 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 device: | |
if device.getSnmpStatusString() != "Up": | |
#Preserve the actual SNMP agent down message | |
if getattr(evt, "summary", "") != "SNMP agent down": | |
evt._action = "drop" |
This file contains 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
Here is what I'm seeing in the logs: | |
``` | |
2014/11/05 14:20:49 [INFO] serf: EventMemberJoin: i-dbbe4bd7 10.152.64.88 | |
2014/11/05 14:21:00 [INFO] serf: EventMemberFailed: i-dbbe4bd7 10.152.64.88 | |
``` | |
And here is a tcpdump snippet (some internal info redacted): | |
``` | |
14:20:45.168346 IP ip-88.1024 > ip-177.8934: UDP, length 240 | |
14:20:48.968555 IP ip-88.1024 > ip-177.8934: UDP, length 53 |