Option to monitor or check custom made services in Ubuntu
-
- Posts: 85
- Joined: Fri Nov 08, 2019 2:40 am
Re: Option to monitor or check custom made services in Ubunt
See this is what im getting in my Nagios server Dashboard, https://prnt.sc/q1vlkh
I want to bring the custom service status here in the dashboard for the same client-server
I want to bring the custom service status here in the dashboard for the same client-server
Re: Option to monitor or check custom made services in Ubunt
Have you added your service in the nagios configs? Please read the Nagios Core documentation on object definitions (for services) here:
https://assets.nagios.com/downloads/nag ... ml#service
You may have something like this:
I don't know what your configs are like, so this is just an example... To make sure you don't have any config errors, after adding the new service, you would need to verify the configuration by running:
If you don't have any config errors (warnings are ok), restart nagios service, so that changes can take effect.
You should be able to see the new service now in the GUI.
https://assets.nagios.com/downloads/nag ... ml#service
You may have something like this:
Code: Select all
define service {
host_name Epixel.in Server
service_description cmmt_revolution
use sometemplate
check_command check_xi_ncpa!-t 'sometoken' -P 5693 -M 'plugins/servicescript.sh'
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
register 1
}
Code: Select all
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Code: Select all
service nagios restart
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 85
- Joined: Fri Nov 08, 2019 2:40 am
Re: Option to monitor or check custom made services in Ubunt
This is what I'm added in my Nagios server config files
https://prnt.sc/q23ooh
and this is what I'm getting in as output in Nagios dashboard
https://prnt.sc/q23pl4
hope you understand it, could you please find an exact service to run it is as exactly what other service running in it
This is the output im getting while running the below command from my Nagios server
https://prnt.sc/q23rif
https://prnt.sc/q23ooh
and this is what I'm getting in as output in Nagios dashboard
https://prnt.sc/q23pl4
hope you understand it, could you please find an exact service to run it is as exactly what other service running in it
This is the output im getting while running the below command from my Nagios server
https://prnt.sc/q23rif
Re: Option to monitor or check custom made services in Ubunt
You are testing your command from the command line on the Nagios server logged in as root... Test it logged in as nagios user.
Do you have a "nagios" entry in sudoers file on the client? Can you run the following command on the remote machine and show the output?
In addition to this, can you show us how your check_ncpa command is configured?
Code: Select all
su - nagios
/usr/local/nagios/libexec/check_ncpa.py -H <ip address of the remote machine> -P 5693 -t <your token> -M 'plugins/servicescript.sh'
Code: Select all
grep 'nagios\|requiretty' /etc/sudoers
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Option to monitor or check custom made services in Ubunt
Actually, the more I look into this, the more I am convinced that this is a configuration issue. It is possible that you are passing the "-H x.x.x.x" twice, and this is what is causing the issue. Your sudoers may be fine. Show the check_ncpa command, so that we will know for sure.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 85
- Joined: Fri Nov 08, 2019 2:40 am
Re: Option to monitor or check custom made services in Ubunt
check_ncpa command means check_ncpa.py script??
where i can find it?( check_ncpa Command)
. Show the check_ncpa command, so that we will know for sure.
where i can find it?( check_ncpa Command)
. Show the check_ncpa command, so that we will know for sure.
Re: Option to monitor or check custom made services in Ubunt
I have no idea how your Nagios server is configured... You should know that.check_ncpa command means check_ncpa.py script??
where i can find it?( check_ncpa Command)
. Show the check_ncpa command, so that we will know for sure.
Normally, the commands are configured in the /usr/local/nagios/etc/objects/commands.cfg file. You should have a command that looks like this one:
Code: Select all
define command {
command_name check_ncpa
command_line $USER1$/check_ncpa.py -H $HOSTADDRESS$ $ARG1$
}
Note: Configuring Nagios Core could be someone challenging, especially for a beginner. If you are having difficulties with configuring/maintaining your Nagios Core server, perhaps you should look into purchasing Nagios XI.
https://www.nagios.com/products/nagios-xi/
Configuration on XI is done via configuration wizards, and it is a lot easier compared Nagios Core.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 85
- Joined: Fri Nov 08, 2019 2:40 am
Re: Option to monitor or check custom made services in Ubunt
yes i m used the same commands you mentioned above
define command {
command_name check_ncpa
command_line $USER1$/check_ncpa.py -H $HOSTADDRESS$ $ARG1$
}
Do i need to make any changes in it?
define command {
command_name check_ncpa
command_line $USER1$/check_ncpa.py -H $HOSTADDRESS$ $ARG1$
}
Do i need to make any changes in it?
Re: Option to monitor or check custom made services in Ubunt
No, don't change your check_ncpa command. Change the "check_command" directive in the "cmmt_revolution" service by removing the "-H 3.219.197.251" part.
Example:
Restart nagios, and check your service again. Let us know if it worked this time.
Example:
Code: Select all
check_command check_ncpa!-t myepstoken -P 5693 -M plugins/servicescript.sh
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 85
- Joined: Fri Nov 08, 2019 2:40 am
Re: Option to monitor or check custom made services in Ubunt
I added as you said in the service https://prnt.sc/q2na26
but still, it showing the output as https://prnt.sc/q2nb14
Please help me on this, Thanks for all your support so far.
Nagiosdashboard output: https://prnt.sc/q2nhu3
Do we need to consider the permission issues? please let me know
but still, it showing the output as https://prnt.sc/q2nb14
Please help me on this, Thanks for all your support so far.
Nagiosdashboard output: https://prnt.sc/q2nhu3
Do we need to consider the permission issues? please let me know