How to change default polling interval?

How to change default polling interval?

Q: How can I change default polling interval for all monitors or for PING monitors only? Now it is 30s or 60s and I must change this property for every host.

A: It’s possible to do this with a simple SQL script for you to change this value directly in the settings database.

Create SQL script (update.sql)

CONNECT '{ipaddress}/3055:C:\ProgramData\IPHost Network
Monitor\data\nms.fdb' USER '{login}' PASSWORD '{password}';
UPDATE MONITORS SET INTERVAL = 900;
COMMIT;

and update.cmd file

isql.exe -q -i update.sql

Put .cmd file and SQL script into the “C:\Program Files\IPHost Network Monitor\firebird\bin\” directory and invoke the update.cmd script.

You can change settings at will, not for all but, say, for given monitor type. For example: modify UPDATE statement in update.sql with the below one to change polling interval for existing PING monitors only:

UPDATE MONITORS SET INTERVAL = 900 WHERE MONITOR_TYPE_ID = 1;

The below table contains the monitor_type_id’s for all the IPHost’s monitor types, so you may customize a query for other types if needed:

1     PING
3     TCP
5     UDP
7     SMTP
9     POP3
11     IMAP
13     HTTP(S)
15     FTP
17     Disk space
19     File
21     Windows Service
23     ODBC Database
25     WMI Query
27     SNMP Custom
29     Script or Program
31     Oracle Database
33     MySQL Database
35     MSSQL Database
37     Web Transaction monitor
39     SSH (Remote Script or Program)
41     DNS
43     SNMP Generic Trap
45     SNMP Traffic Speed
47     SNMP Traffic Volume
49     WMI Traffic Speed
51     WMI Traffic Volume
53     WMI CPU
54     WMI Memory
55     WMI Process
57     SNMP CPU
59     SNMP Memory
61     SNMP Disk space
63     SNMP Process
65     SSH CPU
67     SSH Memory
69     SSH Process
71     SSH Disk space
73     WMI Disk Space  

You can also change default interval value used for new monitors. Please use the following query to change the default polling interval for PING monitors to 900 secs:

UPDATE MONITOR_TYPES INTERVAL = 900  WHERE ID = 1;

After executing it all PING monitors will be created with 900 secs polling interval.

Related topics

Monitor Parameters