rrdweb/graph.py
author Tero Marttila <terom@fixme.fi>
Tue, 08 Dec 2009 20:41:16 +0200
changeset 5 e716718482c3
child 7 804243b0bcb9
permissions -rw-r--r--
hack hack hack some HTML output
5
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     1
import rrd
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     2
import time
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     3
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     4
"""
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     5
    RRDTool graph output
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     6
"""
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     7
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     8
def timestamp () :
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     9
    return time.strftime("%Y/%m/%d %H:%M:%S %Z")
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    10
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    11
def common_opts () :
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    12
    """
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    13
        Common options for all views
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    14
    """
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    15
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    16
    return dict(
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    17
        # output
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    18
        imgformat           = "PNG",
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    19
        #        lazy                = True,
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    20
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    21
        color               = [
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    22
            # disable border
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    23
            # border            = 0,
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    24
            "SHADEA#ffffff00",
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    25
            "SHADEB#ffffff00",
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    26
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    27
            # keep background transparent
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    28
            "BACK#ffffff00",
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    29
            "SHADEB#ffffff00",
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    30
        ],
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    31
         
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    32
        # labels
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    33
        vertical_label      = "bits/s",
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    34
        units               = "si",
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    35
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    36
        # use logarithmic scaling
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    37
        logarithmic         = True,
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    38
        
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    39
        # smooth out lines
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    40
        slope_mode          = True,
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    41
    )
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    42
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    43
def overview_opts () :
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    44
    """
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    45
        Common options for the overview graph
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    46
    """
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    47
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    48
    return dict(
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    49
        width               = 600,
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    50
        height              = 50,
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    51
    ), [
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    52
        "LINE1:in#0000FF:%4s" % "In",
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    53
        "LINE1:out#00CC00:%4s" % "Out",
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    54
    ]
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    55
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    56
def detail_opts () :
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    57
    """
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    58
        Common options for the detail graph
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    59
    """
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    60
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    61
    return dict(
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    62
        # dimensions
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    63
        width               = 600,
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    64
        height              = 200,
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    65
    ), [
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    66
        # values
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    67
        'VDEF:in_max=in,MAXIMUM',
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    68
        'VDEF:in_avg=in,AVERAGE',
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    69
        'VDEF:in_min=in,MINIMUM',
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    70
        'VDEF:out_max=out,MAXIMUM',
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    71
        'VDEF:out_avg=out,AVERAGE',
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    72
        'VDEF:out_min=out,MINIMUM',
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    73
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    74
        # legend/graph
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    75
        "COMMENT:%4s" % "",
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    76
        "COMMENT:%11s" % "Maximum",
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    77
        "COMMENT:%11s" % "Average",
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    78
        "COMMENT:%11s\\l" % "Minimum",
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    79
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    80
        "LINE1:in#0000FF:%4s" % "In",
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    81
        'GPRINT:in_max:%6.2lf %Sbps',
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    82
        'GPRINT:in_avg:%6.2lf %Sbps',
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    83
        'GPRINT:in_min:%6.2lf %Sbps\\l',
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    84
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    85
        "LINE1:out#00CC00:%4s" % "Out",
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    86
        'GPRINT:out_max:%6.2lf %Sbps',
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    87
        'GPRINT:out_avg:%6.2lf %Sbps',
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    88
        'GPRINT:out_min:%6.2lf %Sbps\\l',
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    89
        
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    90
        # mark
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    91
        "COMMENT:Generated %s\\r" % timestamp().replace(':', '\\:'),
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    92
    ]
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    93
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    94
STYLE_DEFS = {
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    95
    'overview': overview_opts,
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    96
    'detail':   detail_opts,
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    97
}
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    98
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    99
def daily_opts (title) :
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   100
    """
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   101
        Common options for the 'daily' view
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   102
    """
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   103
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   104
    return dict(
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   105
        # labels
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   106
        x_grid              = "MINUTE:15:HOUR:1:HOUR:4:0:%H:%M",
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   107
    
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   108
        # general info
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   109
        title               = "Daily %s" % (title, ),
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   110
    
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   111
        # interval
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   112
        start               = "-24h",
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   113
    )
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   114
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   115
def weekly_opts (title) :
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   116
    return dict(
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   117
        # labels
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   118
        #        x_grid              = "MINUTE:15:HOUR:1:HOUR:4:0:%H:%M",
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   119
    
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   120
        # general info
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   121
        title               = "Weekly %s" % (title, ),
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   122
    
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   123
        # interval
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   124
        start               = "-7d",
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   125
    )
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   126
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   127
def yearly_opts (title) :
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   128
    return dict(
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   129
        # labels
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   130
        #        x_grid              = "MINUTE:15:HOUR:1:HOUR:4:0:%H:%M",
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   131
    
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   132
        # general info
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   133
        title               = "Yearly %s" % (title, ),
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   134
    
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   135
        # interval
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   136
        start               = "-1y",
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   137
    )
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   138
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   139
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   140
INTERVAL_DEFS = {
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   141
    'daily':    daily_opts,
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   142
    'weekly':   weekly_opts,
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   143
    'yearly':   yearly_opts,
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   144
}
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   145
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   146
def mrtg_data (rrd_path) :
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   147
    """
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   148
        Data sources for network in/out from an MRTG rrd
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   149
    """
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   150
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   151
    return [
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   152
        # data sources, bytes/s
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   153
        r'DEF:in0=%s:ds0:AVERAGE' % rrd_path,
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   154
        r'DEF:out0=%s:ds1:AVERAGE' % rrd_path,
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   155
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   156
        # data, bits/s
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   157
        'CDEF:in=in0,8,*',
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   158
        'CDEF:out=out0,8,*',
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   159
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   160
    ]        
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   161
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   162
def mrtg (style, interval, title, rrd_path, out_path) :
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   163
    style_opts, style_vars = STYLE_DEFS[style]()
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   164
    interval_opts = INTERVAL_DEFS[interval](title)
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   165
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   166
    opts = rrd.merge_opts(common_opts(), style_opts, interval_opts)
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   167
    data = mrtg_data(rrd_path) + style_vars
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   168
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   169
    return rrd.graph(out_path, *data, **opts)
e716718482c3 hack hack hack some HTML output
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
   170