I have not been able to get postgres to be auto-discoverable when run as postgres user. I have been able to add it manually after RHQ-253 was fixed. How to repeat: Run postgres and RHQ agent on the same machine, with postgres and agent running as different users (I used postgres as postgres, and the agent as jweiss). When you import the newly discovered inventory from the agent, the postgres server will not be among the servers discovered.
FYI, this works for me in HEAD as of Sept 2 at about 3:30pm. My postgres instance runs as the postgres user and my agent is running under jdob. I saw the postgres instance inventoried.
I'm sure this has nothing to do with rev# at this point. Greg says it worked for him too and I think that was on an older rev than I am running. I believe there's a environmental difference, we need to figure out what it is. Is there some debug output that might shed light on where it's going wrong for me?
Different postgres installations have different file permissions for the postgres "data" directory. At least in the case of the postgres 8.3.5 package from enterprisedb, the perms on "data" are set to 700, meaning that postgresql.conf can only be read by the postgres user or root. The version of postgres-server that comes down from fedora910 and rhel5 yum sets 700 on the /var/lib/pgsql directory (one level above where the enterprisedb version sets 700), even more restrictive. Under these conditions, the postgres instance is discovered and inventoried, but the inability to read data/postgresql.conf throws an error in the logs and limits the information available about the postgres config.
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-778
sunil, take a quick look at this one. it can probably be closed but let's see.
Verified on rhq build#423 started postgres and RHQ agent on the same machine, with postgres and agent running as different users. Postgres is auto discovered and imported successfully.
Bulk closing of issues that were VERIFIED, had no target release and where the status changed more than a year ago.