Analysis properties for reading line from file

I want to set up an analysis to find a line in a file and display the value. I have set up my AIX servers to output a command to a text file (tmp/output.txt) and want to find “Entitled Capacity” and display the value. Here is a sample of the file;

Partition Number : 19
Type : Shared-SMT-4
Mode : Capped
Entitled Capacity : 1.00
Partition Group-ID : 32787
Shared Pool ID : 0

I want to display the 1.00 or whatever the value may be.

https://developer.bigfix.com/relevance/reference/file-line.html#line-containing-string-of-file-file-line

It would be something like:
lines whose (it as string as lowercase contains "entitled capacity :") of files "output.txt" of folders "/tmp"

This would return the whole line.

If you just want the value you could include a substring inspector, see https://developer.bigfix.com/relevance/reference/substring.html#following-text-of-substring-substring

Something like
following texts of firsts ":" of lines whose (it as string as lowercase contains "entitled capacity :") of files "output.txt" of folders "/tmp"

This should in theory return only the text after the colon for a leaner property. You might have to tweak the file and folder pieces as I don’t do a lot of work on the *ux side, but all of the above inspectors are supported on AIX, Red Hat, Debian, and so on.

1 Like