News:

We really need your input in this questionnaire

Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Victor Kirhenshtein

#856
Hi,

it looks like we setup hypertables in a wrong way, adding unnecessary space partitioning. This causes hypertable to have lots of chunks, so queries like SELECT max(event_id)  ... took lot of time, because each chunk should be queried. For net major release we already implemented conversion of log tables structure. You can wait for it (likely release time is September) or you can try to convert your event_log and alarms tables manually using the following queries:


ALTER TABLE alarms RENAME TO old_alarms;
CREATE TABLE alarms (
   alarm_id integer not null,
   parent_alarm_id integer not null,
   alarm_state integer not null,
   hd_state integer not null,
   hd_ref varchar(63) null,
   creation_time integer not null,
   last_change_time integer not null,
   rule_guid varchar(36) null,
   source_object_id integer not null,
   zone_uin integer not null,
   source_event_code integer not null,
   source_event_id bigint not null,
   dci_id integer not null,
   message varchar(2000) null,
   original_severity integer not null,
   current_severity integer not null,
   repeat_count integer not null,
   alarm_key varchar(255) null,
   ack_by integer not null,
   resolved_by integer not null,
   term_by integer not null,
   timeout integer not null,
   timeout_event integer not null,
   ack_timeout integer not null,
   alarm_category_ids varchar(255) null,
   event_tags varchar(2000) null,
   rca_script_name varchar(255) null,
   impact varchar(1000) null,
   PRIMARY KEY(alarm_id));
CREATE INDEX idx_alarms_source_object_id ON alarms(source_object_id);
CREATE INDEX idx_alarms_last_change_time ON alarms(last_change_time);
INSERT INTO alarms (alarm_id,parent_alarm_id,alarm_state,hd_state,hd_ref,creation_time,last_change_time,rule_guid,source_object_id,zone_uin,source_event_code,source_event_id,dci_id,message,original_severity,current_severity,repeat_count,alarm_key,ack_by,resolved_by,term_by,timeout,timeout_event,ack_timeout,alarm_category_ids,event_tags,rca_script_name,impact) SELECT alarm_id,parent_alarm_id,alarm_state,hd_state,hd_ref,creation_time,last_change_time,rule_guid,source_object_id,zone_uin,source_event_code,source_event_id,dci_id,message,original_severity,current_severity,repeat_count,alarm_key,ack_by,resolved_by,term_by,timeout,timeout_event,ack_timeout,alarm_category_ids,event_tags,rca_script_name,impact FROM old_alarms;
DROP TABLE old_alarms CASCADE;

ALTER TABLE event_log RENAME TO old_event_log;
DROP INDEX IF EXISTS idx_event_log_event_timestamp;
DROP INDEX IF EXISTS idx_event_log_source;
DROP INDEX IF EXISTS idx_event_log_root_id;
CREATE TABLE event_log (
   event_id bigint not null,
   event_code integer not null,
   event_timestamp integer not null,
   origin integer not null,
   origin_timestamp integer not null,
   event_source integer not null,
   zone_uin integer not null,
   dci_id integer not null,
   event_severity integer not null,
   event_message varchar(2000) null,
   event_tags varchar(2000) null,
   root_event_id bigint not null,
   raw_data text null,
   PRIMARY KEY(event_id,event_timestamp));
CREATE INDEX idx_event_log_event_timestamp ON event_log(event_timestamp);
CREATE INDEX idx_event_log_source ON event_log(event_source);
CREATE INDEX idx_event_log_root_id ON event_log(root_event_id) WHERE root_event_id > 0;
SELECT create_hypertable('event_log', 'event_timestamp', chunk_time_interval => 86400);
INSERT INTO event_log (event_id,event_code,event_timestamp,origin,origin_timestamp,event_source,zone_uin,dci_id,event_severity,event_message,event_tags,root_event_id,raw_data) SELECT event_id,event_code,event_timestamp,origin,origin_timestamp,event_source,zone_uin,dci_id,event_severity,event_message,event_tags,root_event_id,raw_data FROM old_event_log;
DROP TABLE old_event_log CASCADE;


Please note that data copy could take significant time. If you are not intended to keep existing event log you can just drop event_log table and create new one.

Don't forget to make database snapshot or backup before trying this!

Best regards,
Victor
#857
Hi,

there is an option in alarm section of EPP rule - "create helpdesk ticket". If checked it will create ticket automatically when alarm is created.

Best regards,
Victor
#858
General Support / Re: libnetxms.so.34
July 15, 2020, 06:19:01 PM
Hi,

all binaries installed from packages should be in /usr/bin. You can delete any leftovers from /usr/local/bin, or just do not run them.

Server package should install systemd unit. Check it's status with


systemctl status netxmsd


You may need to manually enable it with


systemctl enable netxmsd


If it is enabled but not started, check server log for possible errors.

Best regards,
Victor
#859
General / Re: PostgreSQL subagent
July 15, 2020, 06:16:31 PM
Should it be "WAL receivers" or "WAL sending targets" then - as those servers receive data from current server, not send data to it?
#860
General / Re: PostgreSQL subagent
July 14, 2020, 03:56:20 PM
Added it. Now I have a question regarding these lines:

"SELECT count(*) stanby FROM pg_catalog.pg_stat_replication

{ _T("PostgreSQL.Replication.Stanby(*)"), H_GlobalParameter, _T("REPLICATION/stanby"), DCI_DT_INT64, _T("PostgreSQL/Replication: WAL senders") },

shouldn't it be "standby"? Or even "PostgreSQL.Replication.WALSenders"?

I don't know meaning of this parameter, question is based purely on name and description difference :)

Best regards,
Victor
#861
General / Re: PostgreSQL subagent
July 14, 2020, 02:49:23 PM
It is 9.5.13. I will retest it on 9.6. I'm not sure about support for 9.5 - formally it is supported until 2021, but I don't know how widely it is used.

Best regards,
Victor
#862
Hi,

you can define action in agent configuration file on that machine:


ActionShellExec = RestartService:net stop svcname && net start svcname


(I'm not sure if command is actually correct, but you should get an idea).

then define server side action of type "execute command on remote node", enter RestartService as command name, and add this new action in EPP to be executed on web service error event.

Best regards,
Victor
#863
General Support / Re: libnetxms.so.34
July 14, 2020, 02:39:02 PM
Hi,

looks like nxdbmgr is older than libraries. Also I see that you start it as /usr/local/bin/nxdbmgr which looks like compiled from sources, but libnetxms is in /lib/x86_64-linux-gnu which is usual for installed from deb packages. Are you sure you didn't mix compiled binaries/libraries with installed from packages?

Best regards,
Victor
#864
General / Re: PostgreSQL subagent
July 14, 2020, 12:00:13 PM
Hi,

current subagent version reports the following SQL error on each poll:


SELECT CASE WHEN pg_is_in_recovery() THEN 'YES' ELSE 'NO' END AS in_recovery,  CASE WHEN count(*) > 0 THEN 'YES' ELSE 'NO' END AS is_receiver FROM pg_catalog.pg_stat_wal_receiver
42P01 ERROR:  relation "pg_catalog.pg_stat_wal_receiver" does not exist


Is it possible to somehow detect if this view is present and remove it from polling if not?

Best regards,
Victor
#865
Should be fixed in 3.4.232.

Best regards,
Victor
#866
Please find all files named libssl.dll and libcrypto.dll on that system. It could be that you have wrong versions with same names somewhere.

Best regards,
Victor
#867
General Support / Re: Template Import does not work
July 10, 2020, 10:11:58 AM
Hi,

please try it on 3.4.232. We have fixed bug with importing templates exported from old versions - could be the case here as well.

Best regards,
Victor
#868
Currently no, it requires changes at least in UI, probably in server as well. Nothing too complicated though.

Best regards,
Victor
#869
General Support / Re: Language setting in web gui
July 10, 2020, 10:09:08 AM
If not available (which is the case for older versions) you can add ?lang=en to URL.

Best regards,
Victor
#870
General / Re: PostgreSQL subagent
July 09, 2020, 02:43:42 PM
Yes, please do.