Page 1 of 1

Monitoring service of remote linux server

Posted: Tue Dec 04, 2018 1:36 pm
by t3dus
So I have my nagios server at my house monitoring some stuff on an external linux server but I'm not quite sure how I can monitor a service of a remote linux server?

For windows I'd probably do something like this but what would I do for linux services monitoring?

Code: Select all

define service{
        use                     generic-service
        host_name               Matt-i7
        service_description     Explorer
        check_command           check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
        notifications_enabled           0
        }
I have a service called "furybot" which is basically just a Budabot chat bot i use for a game I play. it shows up in htop like this
budabot.PNG
budabot.PNG (10.79 KiB) Viewed 1551 times
However I'm not sure how i can monitor that in Nagios.

As you can see below it's a custom service I setup.
furybot.PNG
furybot.PNG (8.68 KiB) Viewed 1551 times

Re: Monitoring service of remote linux server

Posted: Wed Dec 05, 2018 9:23 am
by scottwilkerson
For monitoring services on a Linux machine you will need to install an agent on the Linux servers such as NCPA

See the following link for documentation and download instructions
https://www.nagios.org/ncpa/

Re: Monitoring service of remote linux server

Posted: Wed Dec 05, 2018 11:30 am
by t3dus
scottwilkerson wrote:For monitoring services on a Linux machine you will need to install an agent on the Linux servers such as NCPA

See the following link for documentation and download instructions
https://www.nagios.org/ncpa/
Well I knew that and I have no problem doing that. My question is trying to figure out how my definition would look for a custom service like that.

Re: Monitoring service of remote linux server

Posted: Wed Dec 05, 2018 12:18 pm
by scottwilkerson
There is a services section here

Code: Select all

https://www.nagios.org/ncpa/help.php#api-modules-services
something like this

Code: Select all

./check_ncpa.py -H <your IP> -t '<your token>' -M 'services' -q 'service=Dhcp,status=running'
NCPA also has a web UI on servers it is installed on that can show what is available to be monitored in the API tab

Code: Select all

https://IP_ADDRESS:5693/