hi,
i write a plugin using psutil function for checking cpu. when i run this plugin on client server it's work fine.
but when i use ncpa for checking it from Nagios XI server, facing to error "ImportError: No module named psutil"
(psutil already exist on client server).
pls donate me advices for this.
"ImportError: No module named psutil" when using ncpa
"ImportError: No module named psutil" when using ncpa
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: "ImportError: No module named psutil" when using ncpa
Hi,
When you are testing the plugin locally you are logged in as root, however, this will be run as the nagios account when running this from XI. Try logging in as the nagios user account and testing this once. Please post any error output to the thread.
Also, please share the plugin script and I can try to replicate this on my tet system. Thanks! Benjamin
Reference
NCPA custom plugins scripts and configuration
When you are testing the plugin locally you are logged in as root, however, this will be run as the nagios account when running this from XI. Try logging in as the nagios user account and testing this once. Please post any error output to the thread.
Code: Select all
su - nagios
./cpu_check.py -w 10 -c 20
Reference
NCPA custom plugins scripts and configuration
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: "ImportError: No module named psutil" when using ncpa
hi ben,
we found the root cause and fixed it.
need install psutil for python2 beside psutil for python3
pls close the topic
thanks
we found the root cause and fixed it.
need install psutil for python2 beside psutil for python3
pls close the topic
thanks
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: "ImportError: No module named psutil" when using ncpa
HI sacom01,
Great! Glad to hear you got it working.
We'll go ahead and mark this as resolved.
Great! Glad to hear you got it working.
We'll go ahead and mark this as resolved.
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!