CONNECT TO VERTICA does not have client label
Can you file new feature request:
CONNECT TO VERTICA should allow to set client label on connection.
For audit purposes.
As of now, client label is always empty, client type is vertica connect.
Tagged:
0
Answers
You can assign a client label to the connection.
Client connections and their labels appear in the SESSIONS and some Data collector tables like DC_REQUESTS_ISSUED.
To set client labels for ongoing sessions, use SET_CLIENT_LABEL like so:
SELECT SET_CLIENT_LABEL('my_label_xyz');
Please consider the following example:
You are missing point just little bit.
Goal is to have client label for connection on "remote" Vertica cluster. You were talking about setting client on connection for "source" connection side of CONNECT TO VERTICA.
If you will check sessions on "remote" Vertica, connections from CONNECT TO VERTICA will always have no label and dbadmin for CLIENT_OS_USER_NAME. To find connection info, you have to look in "source" vertica logs on timestamp.
Would be nice if user can specify label on connection CONNECT TO VERTICA.
Always setting CLIENT_OS_USER_NAME to dbadmin make connection from CONNECT TO VERTICA anonymous.
Would be nice to set it to something meaningful, for example user_name of source connection, or CLIENT_OS_USER_NAME on source connection.
Purpose of changes - improve Vertica audit.
Previous user comment is definitely from ChatGPT. Common practice is to prohibit ChatGPT-generated content on user forums.
Though, if user is not proficient in English, ChatGPT is definitely a big help.
Thank you Sergey,
I've tried the following from my PC to a remote cluster and the client_label is shown in DC_REQUESTS_ISSUED as defined (MYLABEL),
The user_name and client_os_user_name is shown as my local PC Linux user name
which is also defined as a user in the remote database (not dbadmin).
vsql -h 10.10.10.40 -d EONDB -g MYLABEL -ef myfile.sql
I do not see it
There are two Vertica clusters involved. Let's call then dev and uat. Both cluster s are 12.0.4.
I am connecting to dev, and issuing CONNECT to uat:
/opt/vertica/bin/vsql -g mylabel -h dev_cluster -U dbadmin -w vertica
connect to vertica uat user uat_user password 'uat_pwd' on 'uat_cluster',5433;
Now checking session on uat:
select client_label, client_os_user_name, client_os_hostname from sessions where client_type='vertica connect';
It returns 1 row with all fields empty.