Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For a full list of operators, see this.

Important Note: Missing paths

If a certain path doesn't exist, the parser will skip that metric (because it will consider the path as a failure). For example, consider this:

...

Code Block
_metrics:
    -
        _temp:
            subelementcount:
                _count: $.somepath.somesubelement
        _transform:
            _value.double: |
                {
                    if ("${temp.subelementcount}" == "0") { print "0" } else { print "1" }
                }

Troubleshooting

"No metrics nor dynamic variables were parsed from the tree"

This message indicates that no metrics was found.

Check your:

  • Paths to values
  • Paths to variables
  • Paths to tags
  • Make sure that the rest URI contains the data you want 
  • That any existing AWK code is correct

"AWK code isn't a string but: YamlObject(Map(YamlString(_value) -> YamlString"

You have most likely used the _value: command under a _transform section, but _value is used for fetching data from directly from json structure whereas _transform is expecting data from awk.

...

Code Block
languagebash
#Correct:
_transform:
	_value.double: |
		{
				print "1"
		}
	_tags:
		"name": |
			{
				print "mytag"
				}


#Wrong:
_transform:
	_value.double:
		_value: |
			{
				print "1"
			}
	_tags:
		"name":
			_value: |
				{
					print "mytag"
				}




Good practices

It is recommended to put the sections in this order if possible:

...