This is another widget as replacement for the nagios list provided by https://github.com/QubitProducts/dashing-contrib/wiki/Widget:-Nagios-List
You will need dashing-contrib and nagiosharder
green='\033[0;32m'; red='\033[0;31m'; | |
reset='\033[0m'; | |
## Keep the haltest # number of versions for each plugin. | |
KEEP_PLUGINS=2 | |
echo "Begin processing..." | |
count=$( ls *.rpm | grep -o "jenkins-plugin-[a-z]\+[0-9a-z-]*[0-9a-z]\+-" | sort | uniq | wc -l ) | |
i=0 |
require 'awesome_print' | |
AwesomePrint.defaults = { | |
:indent => -4, | |
:raw => false, ## (true gives better info, but can cause loops) | |
} | |
AwesomePrint.irb! |
This is another widget as replacement for the nagios list provided by https://github.com/QubitProducts/dashing-contrib/wiki/Widget:-Nagios-List
You will need dashing-contrib and nagiosharder
#!/bin/bash | |
( echo 'VM|Status|IP|Memory|OS'; | |
for node in `lxc-ls -1`; do | |
tmpfile=`mktemp -t lxc-info-$node-XXXXXXX`; | |
lxc-info -n $node | sed 's@[ ]*:[ ]*@:@' > $tmpfile | |
status=$( cat $tmpfile | grep 'State:' | awk -F: '{print $2}' ); | |
ip=""; mem=""; os=""; osver=""; | |
if [ "$status" == "RUNNING" ]; then |
/*** BEGIN META { | |
"name": "List GIT Branches", | |
"comment": "You can use this to fill up a dynamic list parameter with branches. Optionally, you can filter the branches to show.", | |
"parameters": [ 'FILTER', 'REMOTE' ], | |
"core": "1.580", | |
"authors": [ | |
{ name : "Jan Vansteenkiste" } | |
] | |
} END META**/ |
I hereby claim:
To claim this, I am signing this object:
require 'yaml' | |
module RSpecHelper | |
module SystemFacter | |
def self.resolve_fact (fact, stubs = {}, facter_path = (ENV['FACTER_PATH'] || '/usr/bin/facter')) | |
env_values = {} | |
command = [ facter_path, '--yaml'] | |
facts_path = File.expand_path(File.dirname(__FILE__) + '/../../lib/facter') |
module Puppet::Parser::Functions | |
newfunction(:calculate_memory_use, :type => :rvalue, :doc => <<-'ENDHEREDOC') do |args| | |
calculate_memory_use(use, reserved, minimum=0) | |
[*use*] How much memory should I use (of the non-reserved space left) | |
* Floating numbers smaller than 1 are interpreted as percentage. | |
* Anything else is used as size. |
$ puppet apply --modulepath=. -e 'include test' | |
Warning: ModuleLoader: module 'test' has unresolved dependencies - it will only see those that are resolved. Use 'puppet module list --tree' to see information about modules | |
(file & line not available) | |
Error: Evaluation Error: Error while evaluating a Function Call, can't modify frozen String at /home/jan/tmp/test/manifests/init.pp:4:16 on node minimoose.home.vstone.be |