Unable to see PostgreSQL services on OPM UI
Unable to see PostgreSQL services on OPM UI
I have installed and configured check_pgactivity. But no PostgreSQL Service is showing on OPM UI. I have contacted with OPM Support they are saying that the problem is on Nagios end.
I have added following lines in command.cgf
define command {
command_name check_pgactivity
command_line $USER1$/check_pgactivity --service bgwriter -U nagios_dispatcher -h $HOSTADDRESS$ $_SERVICEOPTION_THRESHOLD$
}
and following lines in services_nagios2.cfg
define service {
host_name localhost
service_description check_pgactivity
check_command check_pgactivity!-U nagios_dispatcher -s bgwriter -w 80% -c 95%
max_check_attempts 3
check_interval 3
retry_interval 3
check_period 24x7
notification_interval 5
notification_period 24x7
}
I am using ubuntu 14.04.
Regards,
Giles.
I have added following lines in command.cgf
define command {
command_name check_pgactivity
command_line $USER1$/check_pgactivity --service bgwriter -U nagios_dispatcher -h $HOSTADDRESS$ $_SERVICEOPTION_THRESHOLD$
}
and following lines in services_nagios2.cfg
define service {
host_name localhost
service_description check_pgactivity
check_command check_pgactivity!-U nagios_dispatcher -s bgwriter -w 80% -c 95%
max_check_attempts 3
check_interval 3
retry_interval 3
check_period 24x7
notification_interval 5
notification_period 24x7
}
I am using ubuntu 14.04.
Regards,
Giles.
Re: Unable to see PostgreSQL services on OPM UI
Are you able to test the command over the CLI, to get it working to your needs? Then, show us the full input / output so we can help to see how the check should be running.
It looks like you're overlapping, which could be causing issues. Could you show us a screenshot of what the status is reporting?
But, you're passing -U nagios_dispatcher in $ARG1$ of your check_command -
Additionally, your command_line doesn't have any way to pass $ARG1$, might want to modify it to something like below (also depends what $_SERVICEOPTION_THRESHOLD is set to, I don't see you setting that variable at all) -
It looks like you're overlapping, which could be causing issues. Could you show us a screenshot of what the status is reporting?
Code: Select all
command_line $USER1$/check_pgactivity --service bgwriter -U nagios_dispatcher -h $HOSTADDRESS$ $_SERVICEOPTION_THRESHOLD$
}
Code: Select all
check_command check_pgactivity!-U nagios_dispatcher -s bgwriter -w 80% -c 95%
Code: Select all
command_line $USER1$/check_pgactivity --service bgwriter -h $HOSTADDRESS$ $ARG1$ $_SERVICEOPTION_THRESHOLD$
Former Nagios Employee
Re: Unable to see PostgreSQL services on OPM UI
Here are the input and output.
root@giles-S451LA:/usr/lib/nagios/plugins# ./check_pgactivity --service bgwriter -U nagios_dispatcher -h $HOSTADDRESS$ $_SERVICEOPTION_THRESHOLD$
CHECK_PGACTIVITY UNKNOWN: Query fail !
psql: could not translate host name "$" to address: Name or service not known
root@giles-S451LA:/usr/lib/nagios/plugins#
root@giles-S451LA:/usr/lib/nagios/plugins# ./check_pgactivity --service bgwriter -U nagios_dispatcher -h $HOSTADDRESS$ $ARG1$ $_SERVICEOPTION_THRESHOLD$
CHECK_PGACTIVITY UNKNOWN: Query fail !
psql: could not translate host name "$" to address: Name or service not known
root@giles-S451LA:/usr/lib/nagios/plugins#
root@giles-S451LA:/usr/lib/nagios/plugins#
root@giles-S451LA:/usr/lib/nagios/plugins# ./check_pgactivity!-U nagios_dispatcher -s bgwriter -w 80% -c 95%
bash: !-U: event not found
root@giles-S451LA:/usr/lib/nagios/plugins#
root@giles-S451LA:/usr/lib/nagios/plugins# ./check_pgactivity --service bgwriter -U nagios_dispatcher -h $HOSTADDRESS$ $_SERVICEOPTION_THRESHOLD$
CHECK_PGACTIVITY UNKNOWN: Query fail !
psql: could not translate host name "$" to address: Name or service not known
root@giles-S451LA:/usr/lib/nagios/plugins#
root@giles-S451LA:/usr/lib/nagios/plugins# ./check_pgactivity --service bgwriter -U nagios_dispatcher -h $HOSTADDRESS$ $ARG1$ $_SERVICEOPTION_THRESHOLD$
CHECK_PGACTIVITY UNKNOWN: Query fail !
psql: could not translate host name "$" to address: Name or service not known
root@giles-S451LA:/usr/lib/nagios/plugins#
root@giles-S451LA:/usr/lib/nagios/plugins#
root@giles-S451LA:/usr/lib/nagios/plugins# ./check_pgactivity!-U nagios_dispatcher -s bgwriter -w 80% -c 95%
bash: !-U: event not found
root@giles-S451LA:/usr/lib/nagios/plugins#
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Unable to see PostgreSQL services on OPM UI
Your tests at the command line will require the values like $HOSTADDRESS$ to be replaced with the actual values like xxx.xxx.xxx.xxx
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Unable to see PostgreSQL services on OPM UI
root@giles-S451LA:/usr/lib/nagios/plugins# ./check_pgactivity --service bgwriter -U nagios_dispatcher -h localhost
Password:
Password:
POSTGRES_BGWRITER OK: No writes | buffers_backend=0Nps checkpoint_timed=0Nps checkpoint_req=0Nps buffers_checkpoint=0Bps buffers_clean=0Bps maxwritten_clean=0Nps buffers_backend_fsync=0Nps buffers_alloc=0Bpsroot@giles-S451LA:/usr/lib/nagios/plugins#
root@giles-S451LA:/usr/lib/nagios/plugins#
root@giles-S451LA:/usr/lib/nagios/plugins# ./check_pgactivity -U nagios_dispatcher -s bgwriter -w 80% -c 95%
Password:
Password:
POSTGRES_BGWRITER OK: No writes | buffers_backend=0Nps checkpoint_timed=0Nps checkpoint_req=0Nps buffers_checkpoint=0Bps buffers_clean=0Bps maxwritten_clean=0Nps buffers_backend_fsync=0Nps buffers_alloc=0Bpsroot@giles-S451LA:/usr/lib/nagios/plugins#
root@giles-S451LA:/usr/lib/nagios/plugins#
root@giles-S451LA:/usr/lib/nagios/plugins#
Password:
Password:
POSTGRES_BGWRITER OK: No writes | buffers_backend=0Nps checkpoint_timed=0Nps checkpoint_req=0Nps buffers_checkpoint=0Bps buffers_clean=0Bps maxwritten_clean=0Nps buffers_backend_fsync=0Nps buffers_alloc=0Bpsroot@giles-S451LA:/usr/lib/nagios/plugins#
root@giles-S451LA:/usr/lib/nagios/plugins#
root@giles-S451LA:/usr/lib/nagios/plugins# ./check_pgactivity -U nagios_dispatcher -s bgwriter -w 80% -c 95%
Password:
Password:
POSTGRES_BGWRITER OK: No writes | buffers_backend=0Nps checkpoint_timed=0Nps checkpoint_req=0Nps buffers_checkpoint=0Bps buffers_clean=0Bps maxwritten_clean=0Nps buffers_backend_fsync=0Nps buffers_alloc=0Bpsroot@giles-S451LA:/usr/lib/nagios/plugins#
root@giles-S451LA:/usr/lib/nagios/plugins#
root@giles-S451LA:/usr/lib/nagios/plugins#
Re: Unable to see PostgreSQL services on OPM UI
It looks like the plugin is requiring a password, this isn't standard with Nagios plugins - do you know why it's asking?
In this other forum post you created for the issue, https://support.nagios.com/forum/viewto ... 56#p193556 - it looks to be resolved, but the data isn't appearing in OPM. We did not write OPM so it's hard to know how they're pulling information.
In this other forum post you created for the issue, https://support.nagios.com/forum/viewto ... 56#p193556 - it looks to be resolved, but the data isn't appearing in OPM. We did not write OPM so it's hard to know how they're pulling information.
Former Nagios Employee
Re: Unable to see PostgreSQL services on OPM UI
I have no idea why it is asking for password.
OK, you can close the following issue.
https://support.nagios.com/forum/viewto ... 56#p193556
OK, you can close the following issue.
https://support.nagios.com/forum/viewto ... 56#p193556
Re: Unable to see PostgreSQL services on OPM UI
Can you post the entire check_pgactivity plugin for us to look at?
Former Nagios Employee
Re: Unable to see PostgreSQL services on OPM UI
How can I post the entire check_pgactivity plugin here?
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Unable to see PostgreSQL services on OPM UI
You should be able to upload it as an attachment. You may need to add .txt to the extension for it to work.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.