|
|
|
this is a known limitation. work-around is to run both processes as the same user, or run the agent as root.
Works in degraded mode (the config tab gives an error), but at least you can do the basic monitoring.
not working with my latest postgres install
ghinkle: ^^ trying to figure out why <ghinkle> well, all i did jweiss, was to not fail if i couldn't read the postgresql.conf <ghinkle> are there any agent messages? <jweiss> ghinkle: where does it look? <ghinkle> it tries to determine the data path from the environment * jweiss pastebins messages <ghinkle> do you see: "Unable to obtain data directory for postgres process with pid" <jweiss> http://wwwapps.rdu.redhat.com/w3xpastebin/pastebin.php?show=6701 <ghinkle> hmm, ok i see is your PG_DATA_PATH readable by the agent user, but not the postgresql.conf ? <jweiss> that file /usr/local/pgsql/data/postgresql.conf actually does exist, but the dir and file are only readable by postgres user. let me check on the env var <ghinkle> if the pddata dir exists but is not readable, it should've just been a warn and continued <jweiss> PG_DATA_PATH is not set for either the agent user, nor the postgres user <ghinkle> its probably starting with -D though which this will also read from <jweiss> yeah, /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data <ghinkle> well, i suppose i shouldn't fail in any of these cases, since I still try to connect on the defaults <jweiss> is it supposed to fail in this case anyway? i thought you said it should have just warned about the perms <ghinkle> yea, this isn't a code path i expected <jweiss> let me double check <ghinkle> no need. i see it now i can fix this Be even more flexible with permission failures while attempting to load the conf file. Should work even if the directory holding the data directory is readable but the data dir and/or the conf file are not readable.
I was able to get this inventoried manually. Is it supposed to be auto-discoverable?
In the agent log i get: 2008-08-20 11:01:15,941 INFO [InventoryManager.discovery-1] (rhq.core.pc.inventory.AutoDiscoveryExecutor)- Process scan auto-detected new server resource: scan=[ProcessScan: query=[process|basename|match=^(postgres|postmaster)$,process|basename|nomatch|parent=^(postgres|postmaster)$], name=[unix]], discovered-process=[process: pid=[26045], name=[postgres], ppid=[1]] 2008-08-20 11:01:15,943 INFO [InventoryManager.discovery-1] (org.rhq.plugins.postgres.PostgresDiscoveryComponent)- Discovered a postgres process: ProcessScanResult: scan=[ProcessScan: query=[process|basename|match=^(postgres|postmaster)$,process|basename|nomatch|parent=^(postgres|postmaster)$], name=[unix]], info=[process: pid=[26045], name=[postgres], ppid=[1]] 2008-08-20 11:01:15,943 ERROR [InventoryManager.discovery-1] (org.rhq.plugins.postgres.PostgresDiscoveryComponent)- Unable to obtain data directory for postgres process with pid 26045 (tried checking both -D command line argument, as well as PGDATA environment variable). I don't get any metrics, but I suspect that's expected. Greg can you confirm this is the expected behavior? |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RHQ-261, I'm able to auto-discover postgres if I run my rhq agent as root.