SatelliteContentHostsCount - command psql -d foreman -c 'select count(*) from hosts'

The SatelliteContentHostsCount parser reads the output of psql -d foreman -c 'select count(*) from hosts'.

Sample output of psql -d foreman -c 'select count(*) from hosts':

 count
-------
    13
(1 row)

Examples:

>>> type(clients)
<class 'insights.parsers.satellite_content_hosts_count.SatelliteContentHostsCount'>
>>> clients.count
13
class insights.parsers.satellite_content_hosts_count.SatelliteContentHostsCount(context, extra_bad_lines=None)[source]

Bases: CommandParser

Read the psql -d foreman -c 'select count(*) from hosts' and set the hosts count to property count.

count

The count of satellite content hosts

Type:

int

parse_content(content)[source]

This method must be implemented by classes based on this class.