We’ll look deeper into how auto-discover works. First of all, you need to be familiar with what file the data is being stored in. The default directory can be found in “C:\ProgramData\dbWatchControlCenter\config\server” and it’s in file “discovered_instances.xml”.

directory-and-file-where-data-is-stored

When you open the file, you may something like this:

<?xml version="1.0" encoding="UTF-8"?>
<autodiscover>
	<instance>
		<dbms-type>postgres</dbms-type>
		<hostname>Server</hostname>
		<hostip>172.200.59.108</hostip>
		<port>5432</port>
		<id><![CDATA[discoveredinstance:postgres/172.200.59.108/5432@server:5713907582237493967/-7851037117993711602]]></id>
	</instance>
	...
	<scanned>
		<ip>172.200.48.1</ip>
		<time>1624507255855</time>
	</scanned>
	...
	<scan>
		<range><![CDATA[172.200.48.0/20]]></range>
		<interval>-1</interval>
		<last-started>1624507255481</last-started>
		<last-completed>1624509560052</last-completed>
	</scan>
</autodiscover>

What you can observe are those within the < instance > tag are the discovered instances while those in the < scanned > tags are the IP addresses scanned without an instance. Additionally, < scan > shows you the details of the scan. I won’t go over the details but you can read on Discovering Database Instance.

Port is different from the known default port

Let’s say you are using a different listening port to that of the default port which is 5432. As we can see the new listening port below, it’s change to 5455:

postgres-config-configured-port-scenario

How can you change the listening port to reflect those changes?

  1. One thing to do is to check the “discovered_instances.xml” and alter the port value from 5432 to 5455.
	<instance>
		<dbms-type>postgres</dbms-type>
		<hostname>Server</hostname>
		<hostip>172.200.59.108</hostip>
		<port>5455</port>                                                 
		<id><![CDATA[discoveredinstance:postgres/172.200.59.108/5455@server:5713907582237493967/-7851037117993711602]]></id>
	</instance>
  1. Close the monitor and restart the dbWatch server.
  2. Open the dbWatch monitor and you should be able to see the changes:

defining-port-for-postgres

← Defining Autodiscover Ports / FDL console →

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment