I would like to see if there is a way to include other checks as part of the network switch wizard, like port error.
I have downloaded a different plug in to check interface errors that works fine. but I want this type of check to be added automatically as part of the wizard, that way I don't have to add the services later by either doing It manually or bulk copy.
Network Switch Wizard Question
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Network Switch Wizard Question
You can modify the wizard yourself and add the code that creates the services.
Somwhere around line 959 there is something like this:
Inside this if statement you could also add the code to create the service, it's not that complicated:
You'll need to refer to the existing code to see how all the arguments are input including accounting for the different SNMP versions.
The steps I've mentioned above assume that you want the extra service created if the port status option was checked in the wizard. If you wanted to be prompted for different options for your extra service then this is going to get a lot more complex.
This old guide I wrote may also help:
https://exchange.nagios.org/directory/D ... ds/details
Somwhere around line 959 there is something like this:
Code: Select all
// monitor port status
if (array_key_exists("portstatus", $serviceargs)) {Code: Select all
$objs[] = array(
"type" => OBJECTTYPE_SERVICE,
"host_name" => $hostname,
"service_description" => $portname . " XXX your custom service name",
"use" => "xxxxx your custom template",
"check_command" => "xxx your custom command and arguments"
"_xiwizard" => $wizard_name,
);The steps I've mentioned above assume that you want the extra service created if the port status option was checked in the wizard. If you wanted to be prompted for different options for your extra service then this is going to get a lot more complex.
This old guide I wrote may also help:
https://exchange.nagios.org/directory/D ... ds/details
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Network Switch Wizard Question
Thanks, I will play around with that.
Please close the ticket
Please close the ticket