4259 links
  • Arnaud's links
  • Home
  • RSS Feed
  • Tag cloud
  • Login
search: tag:whisper tag:graphite — newest first
  • Note: Bilan whisper et aggregationMethod

    cd /opt/graphite/storage/whisper
    find . -name "*.wsp" | xargs -I {} sh -c "echo -n '{} ' ; whisper-info.py {}|grep aggre|cut -d' ' -f2" > aggreg.dump

    cut -d' ' -f2 aggreg.dump|sort|uniq -c

    82024 average
    2784 max
    1378 min
    8732 sum

    grep -v stats aggreg.dump |cut -d' ' -f2|sort|uniq -c

    59682 average

    Donc oui, tous les whispers collectd sont en average.

    February 3, 2016 - permalink - https://links.infomee.fr/shaare/CAc6mw
    graphite whisper
  • lomik/go-carbon - Go

    Golang implementation of Graphite/Carbon server with classic architecture: Agent -> Cache -> Persister

    used by Doo 1M metric/sec (12 CPU)

    January 18, 2016 - permalink - https://github.com/lomik/go-carbon
    carbon go graphite whisper
  • whisper calculator

    !/usr/bin/env python

    -- coding: utf-8 --

    def archive_to_bytes(archive):
    def to_seconds(s):
    SECONDS_IN_A = {
    's': 1,
    'm': 1 * 60,
    'h': 1 * 60 * 60,
    'd': 1 * 60 * 60 * 24,
    'y': 1 * 60 * 60 * 24 * 365,
    }

        return int(s[:-1]) * SECONDS_IN_A[s[-1]]
    
    archive = [map(to_seconds, point.split(':'))
               for point in args.archive.split(',')]
    
    SIZE_METADATA = 2 * 4 + 4 + 4  # 16 [!2LfL]
    SIZE_ARCHIVE_INFO = 3 * 4  # 12 [!3L]+
    SIZE_POINT = 4 + 8  # 12 [!Ld]+
    
    size = 0
    for resolution, retention in archive:
        size += SIZE_ARCHIVE_INFO + SIZE_POINT * retention/resolution
    
    if size:
        size += SIZE_METADATA
    
    return size
    

    if name == 'main':
    import argparse

    parser = argparse.ArgumentParser(
        description="Calculates the size of the whisper storage for the given \
                archive (in resolution:retention format, e.g. 1m:24h,5m:3m)"
    )
    parser.add_argument(
        'archive',
        help="Archive in storage-schemas.conf format (resolution:retention)"
    )
    
    args = parser.parse_args()
    
    print "{} >> {} bytes".format(args.archive, archive_to_bytes(args.archive))
    
    July 24, 2014 - permalink - https://gist.github.com/jjmaestro/5774063#file-whisper-calculator-py
    calc graphite whisper
  • whisper dump

    [Summary, full note in Shaarli]
    whisper-dump.py : script Python 2 qui affiche le contenu brut d'un fichier whisper (.wsp) de Graphite. Usage : whisper-dump.py path

    • Nécessite le module whisper ; ignore SIGPIPE pour pouvoir piper la sortie (head, less...).
    • Ouvre le fichier en lecture seule avec mmap.
    • read_header : struct.unpack(whisper.metadataFormat) donne aggregationType, maxRetention, xFilesFactor, archiveCount ; puis, pour chaque archive, whisper.archiveInfoFormat donne offset, secondsPerPoint, points (retention = secondsPerPoint * points, size = points * whisper.pointSize).
    • Affiche les métadonnées (aggregation method, max retention, xFilesFactor) et l'en-tête de chaque archive.
    • dump_archives : pour chaque archive, lit chaque point avec whisper.pointFormat et affiche "index: timestamp, valeur".
    • Erreur si le fichier n'existe pas ; CorruptWhisperFile si l'en-tête ne se lit pas.
    July 24, 2014 - permalink - http://bazaar.launchpad.net/~amos-shapira/graphite/whisper-dump/revision/733#whisper/bin/whisper-dump.py
    dump graphite whisper