influxd generate help-schema

    1. title = "Documented schema"
    2. # limit the maximum number of series generated across all measurements
    3. #
    4. # series-limit: integer, optional (default: unlimited)
    5. [[measurements]]
    6. # name of measurement
    7. #
    8. # NOTE:
    9. # Multiple definitions of the same measurement name are allowed and
    10. # will be merged together.
    11. name = "cpu"
    12. # sample: float; where 0 < sample ≤ 1.0 (default: 0.5)
    13. # sample a subset of the tag set
    14. #
    15. # sample 25% of the tags
    16. #
    17. sample = 0.25
    18. # Keys for defining a tag
    19. #
    20. # name: string, required
    21. # Name of field
    22. #
    23. # source: array<string> or object
    24. #
    25. # A literal array of string values defines the tag values.
    26. #
    27. # An object defines more complex generators. The type key determines the
    28. # type of generator.
    29. #
    30. # source types:
    31. #
    32. # type: "sequence"
    33. # generate a sequence of tag values
    34. #
    35. # format: string
    36. # a format string for the values (default: "value%s")
    37. # start: int (default: 0)
    38. # count: int, required
    39. # ending value
    40. #
    41. # type: "file"
    42. # generate a sequence of tag values from a file source.
    43. # The data in the file is sorted, deduplicated and verified is valid UTF-8
    44. #
    45. # path: string
    46. # absolute path or relative path to current toml file
    47. # example sequence tag source. The range of values are automatically
    48. # prefixed with 0s
    49. # to ensure correct sort behavior.
    50. { name = "host", source = { type = "sequence", format = "host-%s", start = 0, count = 5 } },
    51. # tags can also be sourced from a file. The path is relative to the
    52. # schema.toml.
    53. # Each value must be on a new line. The file is also sorted, deduplicated
    54. # and UTF-8 validated.
    55. { name = "rack", source = { type = "file", path = "files/racks.txt" } },
    56. # Example string array source, which is also deduplicated and sorted
    57. { name = "region", source = ["us-west-01","us-west-02","us-east"] },
    58. ]
    59. # Keys for defining a field
    60. #
    61. # name: string, required
    62. # Name of field
    63. #
    64. # count: int, required
    65. # The maximum number of values to generate. When multiple fields
    66. # have the same count and time-spec, they will share timestamps.
    67. #
    68. # A time-spec can be either time-precision or time-interval, which
    69. # determines how timestamps are generated and may also influence
    70. # the time range and number of values generated.
    71. #
    72. # time-precision: string [ns, us, ms, s, m, h] (default: ms)
    73. # Specifies the precision (rounding) for generated timestamps.
    74. #
    75. # If the precision results in fewer than "count" intervals for the
    76. # given time range, the number of values will be reduced.
    77. #
    78. # Example:
    79. # count = 1000, start = 0s, end = 100s, time-precison = s
    80. # 100 values will be generated at [0s, 1s, 2s, ..., 99s]
    81. #
    82. # If the precision results in greater than "count" intervals for the
    83. # given time range, the interval will be rounded to the nearest multiple of
    84. # time-precision.
    85. #
    86. # Example:
    87. # count = 10, start = 0s, end = 100s, time-precison = s
    88. # 100 values will be generated at [0s, 10s, 20s, ..., 90s]
    89. #
    90. # time-interval: Go duration string (eg 90s, 1h30m)
    91. # Specifies the delta between generated timestamps.
    92. #
    93. # If the delta results in fewer than "count" intervals for the
    94. #
    95. # Example:
    96. # count = 100, start = 0s, end = 100s, time-interval = 10s
    97. # 10 values will be generated at [0s, 10s, 20s, ..., 90s]
    98. # If the delta results in greater than "count" intervals for the
    99. # given time range, the start-time will be adjusted to ensure "count" values.
    100. #
    101. # Example:
    102. # count = 20, start = 0s, end = 1000s, time-interval = 10s
    103. # 20 values will be generated at [800s, 810s, ..., 900s, ..., 990s]
    104. #
    105. # source: int, float, boolean, string, array or object
    106. #
    107. # A literal int, float, boolean or string will produce
    108. # a constant value of the same data type.
    109. #
    110. # A literal array of homogeneous values will generate a repeating
    111. # sequence.
    112. #
    113. # An object defines more complex generators. The type key determines the
    114. # type of generator.
    115. #
    116. # source types:
    117. #
    118. # type: "rand<float>"
    119. # generate random float values
    120. # seed: seed to random number generator (default: 0)
    121. # min: minimum value (default: 0.0)
    122. # max: maximum value (default: 1.0)
    123. #
    124. # type: "zipf<integer>"
    125. # generate random integer values using a Zipf distribution
    126. # The generator generates values k ∈ [0, imax] such that P(k)
    127. # is proportional to (v + k) ** (-s). Requirements: s > 1 and v ≥ 1.
    128. # See https://golang.org/pkg/math/rand/#NewZipf for more information.
    129. #
    130. # seed: seed to random number generator (default: 0)
    131. # s: float > 1 (required)
    132. # v: float ≥ 1 (required)
    133. # imax: integer (required)
    134. #
    135. fields = [
    136. # Example constant float
    137. { name = "system", count = 5000, source = 2.5 },
    138. # Example random floats
    139. { name = "user", count = 5000, source = { type = "rand<float>", seed = 10, min = 0.0, max = 1.0 } },
    140. ]
    141. # Multiple measurements may be defined.
    142. [[measurements]]
    143. name = "mem"
    144. tags = [
    145. { name = "host", source = { type = "sequence", format = "host-%s", start = 0, count = 5 } },
    146. { name = "region", source = ["us-west-01","us-west-02","us-east"] },
    147. ]
    148. fields = [
    149. # An example of a sequence of integer values
    150. { name = "free", count = 100, source = [10,15,20,25,30,35,30], time-precision = "ms" },
    151. ]

    sample-data