The state_attrs
method is used to define the attributes that will be tracked by the |reporting| server. In general, this should be a list of attributes that describe the desired state of the system, such as file permissions, cloud provider data (like snapshots, volumes, identifiers, sizes, and access keys), and so on.
Note
This method only works with the |reporting| add-on for |chef server oec|.
The syntax for the state_attrs
method is as follows:
state_attrs :attribute,
:attribute,
:attribute
where attribute
is a comma-delimited list of attributes. For example, the ebs_volume
resource (available from the aws cookbook) uses the state_attrs
method to tell the |reporting| server to track the following attributes:
state_attrs :availability_zone,
:aws_access_key,
:description,
:device,
:most_recent_snapshot,
:piops,
:size,
:snapshot_id,
:snapshots_to_keep,
:timeout,
:volume_id,
:volume_type