Class RrdFileConstants

    • Field Detail

      • MAX_RRD_FILENAME_LENGTH

        public static final int MAX_RRD_FILENAME_LENGTH
        The longest an RRD filename can be, currently 1024 characters.
        See Also:
        Constant Field Values
    • Constructor Detail

      • RrdFileConstants

        public RrdFileConstants()
    • Method Detail

      • isValidRRDLatencyDir

        public static final boolean isValidRRDLatencyDir​(File file,
                                                         String suffix)
        Determines if the provided File object represents a valid RRD latency directory.
        Parameters:
        file - a File object.
        Returns:
        a boolean.
      • isValidRRDName

        public static boolean isValidRRDName​(String rrd)
        Checks an RRD filename to make sure it is of the proper length and does not contain any unexpected charaters. The maximum length is specified by the MAX_RRD_FILENAME_LENGTHconstant. The only valid characters are letters (A-Z and a-z), numbers (0-9), dashes (-), dots (.), and underscores (_). These precautions are necessary since the RRD filename is used on the commandline and specified in the graph URL.
        Parameters:
        rrd - a String object.
        Returns:
        a boolean.
      • convertToValidRrdName

        public static String convertToValidRrdName​(String rrd)
        Note this method will not handle references to higher directories ("..").
        Parameters:
        rrd - a String object.
        Returns:
        a String object.
      • escapeForGraphing

        public static String escapeForGraphing​(String path)