Step by Step - How to discover Linux Servers in ServiceNow
3 Steps [ How to discover Linux Servers in ServiceNow ]
Lets see how can you get started with your first linux servers discovery using servicenow discovery tool. We will start by understading what is required as part of requirement gathering for linux servers. Below i have attached the pre-req for linux discovery:
| Subject | Credential Permissions |
|---|---|
| Account | A regular user account with following specifications: |
| – Password set to never expire and not ask for change at first login. | |
| – Write access to the home directory. | |
| – Sudo rights on below commands (with NOPASSWD option in /etc/sudoers file) | |
| dmidecode, lsof, fdisk, dmsetup, multipath | |
| – Read permission on below files is required – | |
| /etc/*release, /etc/bashrc, /etc/profile, /proc/cpuinfo, | |
| /proc/vmware/sched/ncpus, /var/log/dmesg | |
| /etc/sudoers line example | |
| ALL=(root) NOPASSWD:/sbin/dmidecode | |
| ALL=(root) NOPASSWD:/sbin/lsof | |
| Ports | TCP22 |
| UDP 53 | |
| ICMP ping | |
| Shell | bash/sh only |
REQUIREMENTS:
IP / Subnet : Gather list of all IPs or Subnets which needs to be discovered.
Ports to be opened : 22, 53
User account : SSH or SSH Private Key (Recommended).
Applications/Services : Midserver with good configuration.
Once you have all the requirements handy with you, you are good to start creating discovery configuration. Follow the below steps to see if we are good to start servicenow configuration.
Check#1:
Before we get sarted,
Open your midserver and Ping the target IP >
Eg: ping 127.0.0.1
See if the host if rechable from midserver (This means your able to reach from mid server to target machien)
Check#2:
Enter the command to see if your able to connect to the target using 22 port.
Eg: telnet 127.0.0.1 22
(Your target must be connected).
If any error, Reach out the firewall/network team to see if the port is enabled...
Check#3:
List of supported servicenow Linux flavours for discovery :
For IPv4 discovery:Red HatFedoraDebianSUSECentOS
Ubuntu
For IPv6 discovery:CentOS 7Ubuntu 20
IPv6 supportability limitations
The following operating systems or devices haven’t been verified for IPv6 discovery:Red Hat clusterOracle ClusterwareLinux Pacemaker cluster
Network storage
Check#4:
Open the configured creds record in servicenow (SSH or SSH Private Key) and click on test credentials realted links to see if the creds works for the give IP. (Enter host IP, Port : 22 , Mid server : ( Select the mid server which has ports enabled)
< Lets gets Started >
Step1:
Navigate to : Discovery > Discovery Schedules > new
(Set the below field values, This may vary in your case sometimes...)
a. Enter the name of Schedule as needed.
b. Discover : Configuration Item
c. Mid server selection method : Specific mid server (based on need)
d. MID server : choose your mid sever
e. Location : Choose the location of site
f. Set the schedule data and time as needed (Weekly, Monthly, OnDemand etc...)
g. If you want to choose a specific creds for this schedule you can update the Credential alias (Even if left empty servicenow will pick the creds for ssh configured for the selected mid server)
h. Use SNMP version : (Based on type choose v1/v2c or v3).
i. Leave rest of the field untouched. (unless necessary)
Save the form...
Step2:
Now you must be able to see the realted link > Quick Ranges. Click on it..
A pop up box opens asking for IP/Subnets. Enter the IP Subnets, IP address only in a comma seprated list (Eg. 127.0.0.1, 192.168.0.1, etc...)
Click on Make Ranges Button, This will create a 'Discovery IP Range' in the related list.
Now you have defined the IPs for discovery.
Step3:
Now, your good to launch your linux discovery...
Click on 'Discovery Now' related link, This will redirect to the schedule which will discovery the CI... {Eg. DIS0053463}, Open this record which will have all info and progress of your discovery.
Wait for the state to be 'Completed'...
Once the State is set to 'Completed', You are all done ! You may see all the devices discovered in the 'Devices' Realted list. You can observe the 'Ecc Queue' and 'Discovery Log' if there are any error in your discovery.
I hope this helped you discover all linux server or has given knowledege on how to discover linux server in servicneow. If yes Mark this article and thumbs up and Bookmark for furture reference....
FEEL FREE TO COMMENT BELOW THE ERRORS FACED DURING YOUR DISCOVERY, WILL RESPOND ASAP...
<Previous Post Next Post >
<<< Top Articles >>>
MF Sohail Khilji | Servicenow Developer / Consultant.
https://www.servicenow.com/community/itom-articles/step-by-step-how-to-discover-linux-servers-in-servicenow/ta-p/2822819