Page 1 of 1
how to monitor remote Ubuntu 20.x.x.x
Posted: Sun Feb 21, 2021 4:40 am
by zaji_nms
Dear Expert
on remote Ubuntu server, I have ssh access (first level access only) not Sudo or SU, how to monitor from NagiosXI 5.x.x to that remote Ubuntu 20.x.x.x server for below Services
Disk Usage
CPU (Load)
Memory
You please assume
Username : UsErNaMe
Password : PasWrD
please note on remote Ubuntu server there is no SNMP agent.
Regards
Re: how to monitor remote Ubuntu 20.x.x.x
Posted: Mon Feb 22, 2021 3:10 pm
by benjaminsmith
Hi zaji_nms,
The easiest way to set this up would be to reach out to the Admin of this server and have them install the NCPA agent as its default API has CPU, disk, and memory checks ready to go.
See:
https://assets.nagios.com/downloads/ncp ... g-NCPA.pdf
The other option would be to setup monitoring over ssh. However, it will still be necessary to have sudo privileges to setup ssh access and create a nagios user account.
See:
https://assets.nagios.com/downloads/nag ... ng_SSH.pdf
--Benjamin
Re: how to monitor remote Ubuntu 20.x.x.x
Posted: Tue Feb 23, 2021 12:25 am
by zaji_nms
Thanks benjaminsmith
however if there is third option to install SNMP agent on UBUNTU, then what is requirement.
what to install on UBUNTU and how to monitor from NAGIOSXI
Regards
Re: how to monitor remote Ubuntu 20.x.x.x
Posted: Tue Feb 23, 2021 3:37 pm
by benjaminsmith
Hi
@zaji_nms,
That is true, and we have a setup guide for monitoring Linux using SNMP.
Monitoring Linux Using SNMP
Once you get net-snmp installed and configured, then the Linux SNMP Wizard will setup the CPU, memory, and disk checks for you. For instructions using the wizard, see page 7 of the guide.
Regards,
Benjamin
Re: how to monitor remote Ubuntu 20.x.x.x
Posted: Wed Feb 24, 2021 6:26 am
by zaji_nms
Dear Expert/Benjamin
from NagiosXI able to successfully SNMPwalk (from CLI) as below but when try to add Linux SNMP, showing error
snmpwalk -v 2c -c public ubuntu-server
SNMPv2-MIB::sysDescr.0 = STRING: Linux ______ 5.4.0-42-generic #46-Ubuntu SMP Fri __________ x86_64
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (526907) 1:27:49.07
SNMPv2-MIB::sysContact.0 = STRING: Me <
[email protected]>
SNMPv2-MIB::sysName.0 = STRING: SERVER_NAME
SNMPv2-MIB::sysLocation.0 = STRING: FOUND OKAY
SNMPv2-MIB::sysServices.0 = INTEGER: 72
but when try to add Linux SNMP, showing error as below, how to Fix?
==============================================================
The wizard detected that this server does not have snmpwalk permission on the target host. This will prevent auto population of processes and prevent them from running successfully, but you can continue with the wizard manually. To troubleshoot this ensure that these OIDs are available on the target host: "HOST-RESOURCES-MIB::hrSWRunName" and "HOST-RESOURCES-MIB::hrFSMountPoint".
Regards
Re: how to monitor remote Ubuntu 20.x.x.x
Posted: Wed Feb 24, 2021 10:41 am
by scottwilkerson
zaji_nms wrote:Dear Expert/Benjamin
from NagiosXI able to successfully SNMPwalk (from CLI) as below but when try to add Linux SNMP, showing error
snmpwalk -v 2c -c public ubuntu-server
SNMPv2-MIB::sysDescr.0 = STRING: Linux ______ 5.4.0-42-generic #46-Ubuntu SMP Fri __________ x86_64
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (526907) 1:27:49.07
SNMPv2-MIB::sysContact.0 = STRING: Me <
[email protected]>
SNMPv2-MIB::sysName.0 = STRING: SERVER_NAME
SNMPv2-MIB::sysLocation.0 = STRING: FOUND OKAY
SNMPv2-MIB::sysServices.0 = INTEGER: 72
but when try to add Linux SNMP, showing error as below, how to Fix?
==============================================================
The wizard detected that this server does not have snmpwalk permission on the target host. This will prevent auto population of processes and prevent them from running successfully, but you can continue with the wizard manually. To troubleshoot this ensure that these OIDs are available on the target host: "HOST-RESOURCES-MIB::hrSWRunName" and "HOST-RESOURCES-MIB::hrFSMountPoint".
Regards
When you ran the snmpwalk command did you just get these 7 lines or did you get many many more?
If you just got these 7 lines, this community string is likely limited to only get very little information
Re: how to monitor remote Ubuntu 20.x.x.x
Posted: Thu Feb 25, 2021 12:36 am
by zaji_nms
Dear Scott....Thank for trying to help.
in addition to above lines.....below lines there too (in all total = 42 lines only).
SNMPv2-MIB::sysORID.1 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.2 = OID: SNMP-MPD-MIB::snmpMPDCompliance
SNMPv2-MIB::sysORID.3 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance
SNMPv2-MIB::sysORID.4 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.5 = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup
SNMPv2-MIB::sysORID.6 = OID: TCP-MIB::tcpMIB
SNMPv2-MIB::sysORID.7 = OID: IP-MIB::ip
SNMPv2-MIB::sysORID.8 = OID: UDP-MIB::udpMIB
SNMPv2-MIB::sysORID.9 = OID: SNMP-NOTIFICATION-MIB::snmpNotifyFullCompliance
SNMPv2-MIB::sysORID.10 = OID: NOTIFICATION-LOG-MIB::notificationLogMIB
SNMPv2-MIB::sysORDescr.1 = STRING: The SNMP Management Architecture MIB.
SNMPv2-MIB::sysORDescr.2 = STRING: The MIB for Message Processing and Dispatching.
SNMPv2-MIB::sysORDescr.3 = STRING: The management information definitions for the SNMP User-based Security Model.
SNMPv2-MIB::sysORDescr.4 = STRING: The MIB module for SNMPv2 entities
SNMPv2-MIB::sysORDescr.5 = STRING: View-based Access Control Model for SNMP.
SNMPv2-MIB::sysORDescr.6 = STRING: The MIB module for managing TCP implementations
SNMPv2-MIB::sysORDescr.7 = STRING: The MIB module for managing IP and ICMP implementations
SNMPv2-MIB::sysORDescr.8 = STRING: The MIB module for managing UDP implementations
SNMPv2-MIB::sysORDescr.9 = STRING: The MIB modules for managing SNMP Notification, plus filtering.
SNMPv2-MIB::sysORDescr.10 = STRING: The MIB module for logging SNMP Notifications.
SNMPv2-MIB::sysORUpTime.1 = Timeticks: (2) 0:00:00.02
SNMPv2-MIB::sysORUpTime.2 = Timeticks: (2) 0:00:00.02
SNMPv2-MIB::sysORUpTime.3 = Timeticks: (2) 0:00:00.02
SNMPv2-MIB::sysORUpTime.4 = Timeticks: (2) 0:00:00.02
SNMPv2-MIB::sysORUpTime.5 = Timeticks: (2) 0:00:00.02
SNMPv2-MIB::sysORUpTime.6 = Timeticks: (2) 0:00:00.02
SNMPv2-MIB::sysORUpTime.7 = Timeticks: (2) 0:00:00.02
SNMPv2-MIB::sysORUpTime.8 = Timeticks: (2) 0:00:00.02
SNMPv2-MIB::sysORUpTime.9 = Timeticks: (2) 0:00:00.02
SNMPv2-MIB::sysORUpTime.10 = Timeticks: (2) 0:00:00.02
HOST-RESOURCES-MIB::hrSystemUptime.0 = Timeticks: (84153734) 9 days, 17:45:37.34
HOST-RESOURCES-MIB::hrSystemDate.0 = STRING: 2021-2-25,5:27:32.0,+0:0
HOST-RESOURCES-MIB::hrSystemInitialLoadDevice.0 = INTEGER: 393216
HOST-RESOURCES-MIB::hrSystemInitialLoadParameters.0 = STRING: "BOOT_IMAGE=/vmlinuz-5.4.0-42-generic root=/dev/mapper/ubuntu--vg-ubuntu--lv ro maybe-ubiquity
"
HOST-RESOURCES-MIB::hrSystemNumUsers.0 = Gauge32: 1
HOST-RESOURCES-MIB::hrSystemProcesses.0 = Gauge32: 167
HOST-RESOURCES-MIB::hrSystemMaxProcesses.0 = INTEGER: 0
HOST-RESOURCES-MIB::hrSystemMaxProcesses.0 = No more variables left in this MIB View (It is past the end of the MIB tree)
Re: how to monitor remote Ubuntu 20.x.x.x
Posted: Thu Feb 25, 2021 2:50 pm
by ssax
What is the output of these commands?
Code: Select all
snmpwalk -v 2c -c 'public' ubuntu-server HOST-RESOURCES-MIB::hrSWRunName
snmpwalk -v 2c -c 'public' ubuntu-server HOST-RESOURCES-MIB::hrFSMountPoint
If those don't return anything you likely need to edit your ubuntu server's
/etc/snmp/snmpd.conf file and change this:
Code: Select all
view systemonly included .1.3.6.1.2.1.25.1
To this:
Code: Select all
view systemonly included .1.3.6.1.2.1.25
Then restart snmpd and test again:
Re: how to monitor remote Ubuntu 20.x.x.x
Posted: Fri Feb 26, 2021 12:26 am
by zaji_nms
great SSAX
Thanks to you and Nagios Support Team....Long Live.
its working fine after below changes (per your advice/hint)
# system + hrSystem groups only
view systemonly included .1.3.6.1.2.1.1
#view systemonly included .1.3.6.1.2.1.25.1
view systemonly included .1.3.6.1.2.1.25
Regards
Re: how to monitor remote Ubuntu 20.x.x.x
Posted: Fri Feb 26, 2021 11:15 am
by benjaminsmith
great SSAX
Thanks to you and Nagios Support Team....Long Live.
Excellent! Glad it's working for you now.
We'll go ahead and mark this as resolved.
Thank you for using Nagios.