• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to add windows host in nagios 4.3.40 on OpenSUSE leap 42.3

{{postValue.id}}

To add Windows host in Nagios(4.3.4) on OpenSUSE leap 42.3

Nagios is an open source monitoring tool, with Nagios, you can monitor your remote hosts and their services remotely on a single window. It shows warnings and indicates if something goes wrong or not in its usual way.

Procedure

Open your Nagios server

open_nagios
nagios_server

To add Windows host in Nagios server install NCPA plugin(Nagios Cross Platform Agent) you can download and install ncpa in any archive format as follows

linuxhelp:~ # wget https://assets.nagios.com/downloads/ncpa/check_ncpa.tar.gz
--2018-04-06 16:35:54--  https://assets.nagios.com/downloads/ncpa/check_ncpa.tar.gz
Resolving assets.nagios.com (assets.nagios.com)... 72.14.181.71, 2600:3c00::f03c:91ff:fedf:b821
Connecting to assets.nagios.com (assets.nagios.com)|72.14.181.71|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4129 (4.0K) [application/x-gzip]
Saving to: ‘ check_ncpa.tar.gz’ 

100%[=============================================> ] 4,129       --.-K/s   in 0.008s  

2018-04-06 16:35:55 (523 KB/s) - ‘ check_ncpa.tar.gz’  saved [4129/4129]

After downloading extract the downloaded package

linuxhelp:~ # tar -zxf check_ncpa.tar.gz
linuxhelp:~ # mv check_ncpa.py /usr/local/nagios/libexec/
linuxhelp:~ # chown nagios:nagios /usr/local/nagios/libexec/check_ncpa.py
linuxhelp:~ # chmod 775 /usr/local/nagios/libexec/check_ncpa.py

Next add your command (ncpa into commands.cfg)
linuxhelp:~ # vim /usr/local/nagios/etc/objects/commands.cfg
Define your command as

define command {
    command_name    check_ncpa
    command_line    $USER1$/check_ncpa.py -H $HOSTADDRESS$ $ARG1$
}

assign a appropriate permission to the added script

linuxhelp:/usr/local/nagios/ext  # chown &ndash R nagios.nagios  /usr/local/nagios/
linuxhelp:/usr/local/nagios/ext  # chmod &ndash R 775 /usr/local/nagios/

And then Save and exit the configuration and restart both the Apache and Nagios

linuxhelp:~ # systemctl restart nagios
linuxhelp:~ # systemctl restart apache2

Now move to your windows machine and download the ncpa plugin for windows from Nagios official website

download_URL
choose_OS
download_nagios
welcome_nagios
configure_license
complete_setup

Next move to Nagios server and go to /usr/local/nagios/etc path location

linuxhelp:~ # cd /usr/local/nagios/etc
linuxhelp: /usr/local/nagios/etc # vim nagios.cfg
add

cfg_dir=/usr/local/nagios/etc/servers

Save and exit the file. Then create and move inside the directory

linuxhelp:~ # cd /usr/local/nagios/etc
linuxhelp: /usr/local/nagios/etc/ # mkdir servers
linuxhelp: /usr/local/nagios/etc/servers # vim windows.cfg
define host {
    host_name               Windows Host
    address                 192.168.7.102
    check_command           check_ncpa!-t ' Nagios'  -P 5693 -M system/agent_version
    max_check_attempts      5
    check_interval          5
    retry_interval          1
    check_period            24x7
    contacts                nagiosadmin
    notification_interval   60
    notification_period     24x7
    notifications_enabled   1
    icon_image              ncpa.png
    statusmap_image         ncpa.png
    register                1
}

define service {
    host_name               Windows Host
    service_description     CPU Usage
    check_command           check_ncpa!-t ' Nagios'  -P 5693 -M cpu/percent -w 20 -c 40 -q ' aggregate=avg' 
    max_check_attempts      5
    check_interval          5
    retry_interval          1
    check_period            24x7
    notification_interval   60
    notification_period     24x7
    contacts                nagiosadmin
    register                1
}

define service {
    host_name               Windows Host
    service_description     Memory Usage
    check_command           check_ncpa!-t ' Nagios'  -P 5693 -M memory/virtual -w 50 -c 80 -u G
    max_check_attempts      5
    check_interval          5
    retry_interval          1
    check_period            24x7
    notification_interval   60
    notification_period     24x7
    contacts                nagiosadmin
    register                1
}

define service {
    host_name               Windows Host
    service_description     Process Count
    check_command           check_ncpa!-t ' Nagios'  -P 5693 -M processes -w 150 -c 200
    max_check_attempts      5
    check_interval          5
    retry_interval          1
    check_period            24x7
    notification_interval   60
    notification_period     24x7
    contacts                nagiosadmin
    register                1
}

After providing your configuration save and exit from the file

Now restart your Nagios and Apache service

linuxhelp: /usr/local/nagios/etc/servers # systemctl restart apache2
linuxhelp: /usr/local/nagios/etc/servers # systemctl restart nagios

Next, navigate to the browser and open Nagios interface
browser_nagios
nagios_interface

with this, the method to add Windows host in Nagios(4.3.4) on OpenSUSE leap 42.3 comes to an end.

Tags:
caden
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

The main term of using thr Nagios server?

A

Nagios is an open source Network monitoring tool that monitors system, networks and infrastructure. It also detects the protocol failures and network outages. It provides monitoring and alert

Q

Does Nagios XI have an audit log?

A

Yes, the Enterprise edition features this under the Admin -> Audit Log page.

Q

Is there a one-page-to-rule-them-all on Nagios XI that I can display constantly to my whole team?

A

Yes, look at the Home -> Operations Screen menu. It will auto refresh on an interval as well.

Q

What type of notifications does Nagios support?

A

Email, SMS, and anything you can script on your own.

Q

Does Nagios XI have an API?

A

Yes, you can automate plenty of things with it too! Take a look at the ‘Help’ menu which shows a few examples on different use cases.

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help David Lopez Guillen ?
Ayuda urgente instale SSL para servidor Opensuse y ahora no funciona tengo servicio web

hola segui este tutorial para tener un certificado ssl y ahora no se ve mi app en la red, espero alguien pueda ayudarme, tengo M9oodle en3.5 en un servidor open suse y ahora no funciona por favor ayuda.

https://www.linuxhelp.com/how-to-create-ssl-certificate-in-opensuse

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.