do not enough $ARG$ for my service
Re: do not enough $ARG$ for my service
hi ben,
first, ncpa version : Agent_version was ['2.2.2']
the picture you send, "I'm able to view more than one line of output in the XI interface." Two lines you see, it was only ONE, you can see the PID and Mem_vms, it same.
"For testing purposes, can you adjust the thresholds so you definitely are returning more than one line? "
--> you can see thresholds in two server are the same but it show very different result.
i'm not clear what you mean in this.
first, ncpa version : Agent_version was ['2.2.2']
the picture you send, "I'm able to view more than one line of output in the XI interface." Two lines you see, it was only ONE, you can see the PID and Mem_vms, it same.
"For testing purposes, can you adjust the thresholds so you definitely are returning more than one line? "
--> you can see thresholds in two server are the same but it show very different result.
i'm not clear what you mean in this.
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: do not enough $ARG$ for my service
Hi sacom01,
When I tested this I was not able to notice a difference between running the plugin locally vs using NCPA. Overall the plugin returns an exit code and plugin output that Nagios can process.
Thanks,
Benjamin
When I tested this I was not able to notice a difference between running the plugin locally vs using NCPA. Overall the plugin returns an exit code and plugin output that Nagios can process.
I believe this is an issue with the plugin itself and the way it outputs data. Can you provide more specifics are what you would expect to see, my apologies, but I'm not 100% clear on the requirements?the picture you send, "I'm able to view more than one line of output in the XI interface." Two lines you see, it was only ONE, you can see the PID and Mem_vms, it same
Thanks,
Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: do not enough $ARG$ for my service
"Can you provide more specifics are what you would expect to see, my apologies, but I'm not 100% clear on the requirements?"
--> the issue here is it was not show all alert exist in the server. E.g : when we run on the command, it have 80 process have been alerted. But on the Nagios, it show only one - itself process.
You can see the picture, it will show like that
--> the issue here is it was not show all alert exist in the server. E.g : when we run on the command, it have 80 process have been alerted. But on the Nagios, it show only one - itself process.
You can see the picture, it will show like that
You do not have the required permissions to view the files attached to this post.
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: do not enough $ARG$ for my service
Hi,
If it's returning in the CLI, but not in the GUI, I suspect it's maxing out the database field size. What is the output of the following command:
--Benjamin
If it's returning in the CLI, but not in the GUI, I suspect it's maxing out the database field size. What is the output of the following command:
Code: Select all
echo 'desc nagios_servicechecks;desc nagios_hostchecks;' | mysql -u root -pnagiosxi nagios -t
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: do not enough $ARG$ for my service
hi,
"I suspect it's maxing out the database field size" --> i dont think so bro. At least it will show 7-8 rows, it work like that on UAT environment but in production it show just one as you known.
"I suspect it's maxing out the database field size" --> i dont think so bro. At least it will show 7-8 rows, it work like that on UAT environment but in production it show just one as you known.
You do not have the required permissions to view the files attached to this post.
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: do not enough $ARG$ for my service
Hi,
Thanks for posting the query, that looks okay. It looks like what is happening is when running the plugin, NCPA runs as the nagios user account and it can only see the processes for that user account.
If you want to see every process, then the plugin will have to run as sudo. In order to do this, NCPA has to be version 2.1 or higher.
https://www.nagios.org/ncpa/help/2.2/index.html
https://github.com/NagiosEnterprises/ncpa/issues/304
Try enabling sudo and test this once more. In the ncpa.cfg file on the remote host add the following
Then add the following to the "/etc/sudoers" file on your remote NCPA agent.
Be sure to restart the NPCA service after making those changes. If you get any error messages, please post them to the thread.
Thanks for posting the query, that looks okay. It looks like what is happening is when running the plugin, NCPA runs as the nagios user account and it can only see the processes for that user account.
If you want to see every process, then the plugin will have to run as sudo. In order to do this, NCPA has to be version 2.1 or higher.
See:New configuration options - New configuration options available:
run_with_sudo - Comma separated list of plugin names that should be ran through sudo
https://www.nagios.org/ncpa/help/2.2/index.html
https://github.com/NagiosEnterprises/ncpa/issues/304
Try enabling sudo and test this once more. In the ncpa.cfg file on the remote host add the following
Code: Select all
run_with_sudo = /usr/local/ncpa/plugins/check_OSprocess.py
Code: Select all
nagios ALL=(ALL) NOPASSWD:/usr/local/ncpa/plugins/check_OSprocess.py
Code: Select all
systemctl restart ncpa_listener
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: do not enough $ARG$ for my service
hi,
i tried add sudo for plugin but not effect.
then i tried run on remote server using nagios user but it not work as well
i tried add sudo for plugin but not effect.
then i tried run on remote server using nagios user but it not work as well
You do not have the required permissions to view the files attached to this post.
Re: do not enough $ARG$ for my service
What is the output of this command on the remote system (not the XI server)?
I didn't need to use sudo on mine, all I had to do was change this in the ncpa.cfg:
If you run these commands as root on the remote system, do you see all the pids from other users?
Code: Select all
mount | grep hidepidCode: Select all
.py = python3 $plugin_name $plugin_argsCode: Select all
su - nagios
ps auxRe: do not enough $ARG$ for my service
hi,
python3 already set for python on ncpa.cfg
python3 already set for python on ncpa.cfg
You do not have the required permissions to view the files attached to this post.
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: do not enough $ARG$ for my service
Hi,
Thanks for checking that. Please open a support ticket for this issue and reference this post when opening a ticket. We'll have to get a remote session set up to take a closer look at the systems as we haven't been able to replicate the issue here.
To open a support ticket:
https://support.nagios.com/tickets/
Thanks,
Benjamin
Thanks for checking that. Please open a support ticket for this issue and reference this post when opening a ticket. We'll have to get a remote session set up to take a closer look at the systems as we haven't been able to replicate the issue here.
To open a support ticket:
https://support.nagios.com/tickets/
Thanks,
Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!