adding new datasource to an existing RRD

前端 未结 3 1928
遥遥无期
遥遥无期 2021-02-09 10:23

I have few 100s of rrds and i want to add 5 extra datasource to all of those rrds.

  1. Is it advisable to do so
  2. Whats the best way and the fastest way to do
3条回答
  •  一个人的身影
    2021-02-09 10:48

    If you're using PNP4Nagios (https://docs.pnp4nagios.org/pnp-0.6/start), they provide a utility script rrd_modify.pl for modifying existing RRD data files.

        $ rrd_modify.pl -h
    
       === rrd_modify.pl 0.01 ===
       Copyright (c) 2012 PNP4Nagios Developer Team (http://www.pnp4nagios.org)
    
       This script can be used to alter the number of data sources of an RRD file.
    
       Usage:
       rrd_modify.pl RRD_file insert|delete start_ds[,no_of_cols] [type]
    
       Arguments:
       RRD_file
          the location of the RRD file. It will NOT be overwritten but appended
          by ".chg"
       insert or delete
          the operation to be executed
       start_ds
          the position at which the operation starts (1..no of data sources+1)
       no_of_cols
          (an optional) number of columns which will be added/deleted
       type
          the data type (one of GAUGE, COUNTER)
                    Defaults to GAUGE if not specified for insert operations
            (DERIVE, ABSOLUTE, COMPUTE have not been tested and might result in
                     errors during creation of a new RRD file)
    

提交回复
热议问题