Nagios Core: I made some custom service for example "casa-dashboard-service" and I add a restart button in service page. Now i want to restart that service when user click on restart button. I added button in service page infront of each service whose status is critical and when click on that button it redirect to page where service name, host name is displayed in text field with commit and reset button. Now what i want is when user click on commit button my another bash script get executed in which i wrote "systemctl restart casa-dashboard.service". But it throw an error
Warning: Unrecognized external command -> CASA_RESTART_SERVICE;home_server;Casadigi Dashboard Service;1559309957
External command error: Unknown or unsupported command. So please give me a solution to solve that problem
Nagios Core: Restart custom service from service page ui
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios Core: Restart custom service from service page ui
I don't understand what you are trying to do, the external command CASA_RESTART_SERVICE isn't a valid nagios external command
Check out the following to see valid external command you can run in Nagios
https://assets.nagios.com/downloads/nag ... ernalcmds/
Check out the following to see valid external command you can run in Nagios
https://assets.nagios.com/downloads/nag ... ernalcmds/
Re: Nagios Core: Restart custom service from service page ui
I want to add my custom commands in nagios external command. When user click on restart button from service listing page than with the help of that custom command i want to restart my service. Now i need your help to achieve that .
Re: Nagios Core: Restart custom service from service page ui
Hello, I attach an image to clear you more what i want to do. In that image you can see Restart the service link which i highlighted in purple colour. Now what i need is when i click on that restart link my some bash script get executed in which i write restart script command.scottwilkerson wrote:I don't understand what you are trying to do, the external command CASA_RESTART_SERVICE isn't a valid nagios external command
Check out the following to see valid external command you can run in Nagios
https://assets.nagios.com/downloads/nag ... ernalcmds/
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios Core: Restart custom service from service page ui
You would need to modify the C code of the project to create such a command, I cannot assist with this.anjali wrote:I want to add my custom commands in nagios external command. When user click on restart button from service listing page than with the help of that custom command i want to restart my service. Now i need your help to achieve that .
https://github.com/NagiosEnterprises/nagioscore