Skip to content

Instantly share code, notes, and snippets.

View aneeshkp's full-sized avatar

Aneesh Puttur aneeshkp

View GitHub Profile
## Pull kube-ansible
[tohayash@tohayash-lab work]$ git clone https://github.com/redhat-nfvpe/kube-ansible.git
Cloning into 'kube-ansible'...
remote: Enumerating objects: 32, done.
remote: Counting objects: 100% (32/32), done.
remote: Compressing objects: 100% (23/23), done.
remote: Total 3019 (delta 8), reused 21 (delta 7), pack-reused 2987
Receiving objects: 100% (3019/3019), 529.58 KiB | 658.00 KiB/s, done.
Resolving deltas: 100% (1382/1382), done.
[tohayash@tohayash-lab work]$ cd kube-ansible
https://github.com/devopscube/kubenetes-rbac-resources-verbs/blob/master/README.md
import csv
import requests
import sys
def GetMetrixNames(url):
response = requests.get('{0}/api/v1/label/__name__/values'.format(url))
results = response.json()['data']
#Return metrix
return results
@aneeshkp
aneeshkp / prom_metrix_to_csv.py
Created June 13, 2018 14:03
Export data from Prometheus to csv file
import csv
import requests
import sys
def GetMetrixNames(url):
response = requests.get('{0}/api/v1/label/__name__/values'.format(url))
names = response.json()['data']
#Return metrix names
return names
@aneeshkp
aneeshkp / Barometer side config
Created March 27, 2018 15:14
QpidRouter Configurations
##
## Licensed to the Apache Software Foundation (ASF) under one
## or more contributor license agreements. See the NOTICE file
## distributed with this work for additional information
## regarding copyright ownership. The ASF licenses this file
## to you under the Apache License, Version 2.0 (the
## "License"); you may not use this file except in compliance
## with the License. You may obtain a copy of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
{
"mappings": {
"connectivity": {
"_all": {
"enabled": true
},
"properties": {
"labels": {
"type": "object",
"properties": {
#!/usr/bin/env python
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
from optparse import OptionParser
import random
import math
import threading
import os
import sys
from urllib2 import build_opener, Request, HTTPHandler
@aneeshkp
aneeshkp / config
Created November 30, 2017 14:48
Prometheus test
# my global config
global:
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
# scrape_timeout is set to the global default (10s).
# Alertmanager configuration
alerting:
alertmanagers:
- static_configs:
#!/bin/sh
pattern="Resource_Performance_Test_high:gnocchi.test.redhat.com.12"
policy="high"
#resource
arr_resource=()
idx=0
for i in $(gnocchi resource list | grep $pattern | cut -d "|" -f 2)
do
arr_resource[idx]=$i
Tuesday 10 October 2017 09:49:19 -0400 (0:00:00.681) 0:29:04.277 *******
fatal: [undercloud]: FAILED! => {
"changed": false,
"failed": true,
"invocation": {
"module_args": {
"msg": [
"### controller-token FAILED ###",
"Task 'Check if token value is disabled.' failed:",
"Host: localhost",