influxdata / influxdb

Scalable datastore for metrics, events, and real-time analytics
https://influxdata.com
Apache License 2.0
28.31k stars 3.52k forks source link

influxdb format :: to make whole tag value as string #16399

Open priyankamondalairtel opened 4 years ago

priyankamondalairtel commented 4 years ago

HI, below is my data with influx format, but it is not executable by telegraf as there is some special character in sql_text field.

oracle_session_long_running,sql_id=cp4cdt8yb6bv1,sql_text=SELECT_com_case_id_AS_complaint_id,_com_mobile_no_AS_telephone_no,QUT_TYPE_DESCRIPTION_AS_subject,_DECODE(esc_finalstatus,'RESOLVED',DECODE((SELECT_com_case_status_FROM_cms_m_complaint_WHERE_com_caseid=_cte_caseid),'CLOSE','CLOSE',_'RESOLVED'),_NULL,DECODE((SELECT_com_case_status_FROM_cms_m_complaint_WHERE_com_caseid=cte_caseid),'CLOSE','CLOSE',_esc_outstatus),'CLOSE',DECODE((SELECT_com_case_status_FROM_cms_m_complaint_WHERE_com_caseid=__cte_caseid),'CLOSE','CLOSE',_esc_outstatus),_esc_outstatus)_AS_eos,_cms_m_querysource_cms_source_ASSOURCE,SUBSTR(cms_m_complaint_com_caseid,-2)_+_1_AS_iterations,_cms_m_casetype_cast_type_AS_case_type,to_char(com_com_date,'dd-mm-rrrr_hh24:mi:ss')_AS_LOG_TIME,to_char(nvl(esc_process_expiry_time,com_commit_time),'dd-mm-rrrr_hh24:mi:ss')_AS_expiry_time_FROM_CMS_M_COMPLAINT,cms_t_escalationlog,cms_m_querytype_WHERE_com_caseid=_cte_case_id_ANDcms_m_complaint_com_case_idIN(SELECT_max(cms_m_complaint_com_case_id)_FROMcms_,machine=SLDC1PACSWEBAP04 last_call_et=3756

now my requirement is to make whole fleld value in sql_text key as a string. how to achieve this. note: adding "\" before starting a special character can be used, but here in this case no special character is fixed. so the only solution left is to make whole line as a string.

russorat commented 4 years ago

@priyankamondalairtel this feels like it should be opened in the Telegraf repo: https://github.com/influxdata/telegraf/issues

Could you confirm and then re-open there following their issue template for bugs?