MOON
Server: Apache
System: Linux vps.erhabenn.com.br 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64
User: sonne (1011)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: //usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pyc
�
d�bc	@s�ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	m	Z	ddl
jjZddl
jjZddlmZddlmZmZddlmZddlmZmZddlmZddlmZmZmZmZm Z m!Z!dd	l"m#Z#m$Z$dd
l%m&Z&m'Z'm(Z(m)Z)m*Z*ddl+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2ddl3m4Z4d
Z5da6dZ7dZ8dZ9dZ:dZ;e<Z=dZ>dZ?ej@d�ZAd�ZBdfd��YZCdZDeCjEeCjFeCjGeCjHgZIdeJfd��YZKeK�ZLeCjMgZNd�ZOd�ZPd�ZQd �ZRd!�ZSeTd"�ZUd#eJfd$��YZVd%eJfd&��YZWeW�ZXd'�ZYd(�ZZeTd)eTd*�Z[eTd)d+�Z\e<eXd,�Z]eXd-�Z^e.eCj_eTd.e`e,�d)eTeXd/�Zae<eXd0�ZbeCj_eTd.e`e,�d)eTe<eXd1�Zcd2�Zdd3�Zed4�Zfd5�Zgd6�Zhd7�ZidS(8i����N(tdatetime(tAgentGlobals(t
EventErrortOSUtilError(tustr(tget_propertiestset_properties(t
get_osutil(tTelemetryEventParamtTelemetryEventtCommonTelemetryEventSchematGuestAgentGenericLogsSchematGuestAgentExtensionEventsSchemat!GuestAgentPerfCounterEventsSchema(tfileutilttextutil(t	parse_doctfindalltfindt	getattribtstr_to_encoded_ustr(tCURRENT_VERSIONt
CURRENT_AGENTt
AGENT_NAMEtDISTRO_NAMEtDISTRO_VERSIONtDISTRO_CODE_NAMEtAGENT_EXECUTION_MODE(tget_imds_clientteventss2Event: name={0}, op={1}, message={2}, duration={3}s$69B669B9-4AF8-4C50-BDC4-6006FA76E975iis$FFF0196F-EE4C-4EAF-9AA5-776F622DEB4Fii�s.waagent.tlds!(?P<agent_event>\.waagent)?\.tld$cCstS(N(tSEND_LOGS_TO_TELEMETRY(((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pytsend_logs_to_telemetry@stWALAEventOperationcBspeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!d Z"d!Z#d"Z$d#Z%d$Z&d%Z'd&Z(d'Z)d(Z*d)Z+d*Z,d+Z-d,Z.d-Z/d.Z0d/Z1d0Z2d1Z3d2Z4d3Z5d4Z6d5Z7d6Z8d7Z9d8Z:d9Z;d:Z<d;Z=RS(<tActivateResourceDisktAgentBlacklistedtAgentEnabledtAgentUpgradetArtifactsProfileBlobtCGroupsCleanUptCGroupsDisabledtCGroupsInfotCollectEventErrorstCollectEventUnicodeErrorstConfigurationChanget
CustomDatatDefaultChannelChangetDeploytDisablet	DowngradetDownloadtEnabletExtensionProcessingt!ExtensionTelemetryEventProcessingtFetchGoalStatetFirewallt	GoalStatetGoalStateUnsupportedFeaturestHealthChecktHealthObservationt	HeartBeatt
HostPlugintHostPluginHeartbeattHostPluginHeartbeatExtendedt
HttpErrorstHttpGett
ImdsHeartbeattInstalltInitializeHostPlugintLogt
LogCollectiontOSInfot	PartitiontPersistFirewallRulestPluginSettingsVersionMismatchtInvalidExtensionConfigt	ProvisiontProvisionGuestAgenttRemoteAccessHandlingtReportEventErrorstReportEventUnicodeErrorstReportStatustReportStatusExtendedtRestarttSequenceNumberMismatchtSetCGroupsLimitst
SkipUpdatetStatusProcessingtUnhandledErrort	UnInstalltUnknowntUpdatet
VmSettingstVmSettingsSummary(>t__name__t
__module__R!R"R#R$R%R&R'R(R)R*R+R,R-R.R/R0R1R2R3R4R5R6R7R8R9R:R;R<R=R>R?R@RARBRCRDRERFRGRHRIRJRKRLRMRNRORPRQRRRSRTRURVRWRXRYRZR[R\(((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pyR DsxiPtEventStatuscBsheZdZd�Zd�Zd�Zd�Zej�d�Z	d�Z
d�Zd�Zd	�Z
RS(
sevent_status.jsoncCsd|_i|_dS(N(tNonet_patht_status(tself((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pyt__init__�s	cCsi|_|j�dS(N(Rbt_save(Rc((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pytclear�s	cCs|j|||�|jkS(N(t_event_nameRb(Rctnametversiontop((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pytevent_marked�scCs9|j|||�}||jkr(tS|j|tkS(N(RgRbtTrue(RcRhRiRjtevent((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pytevent_succeeded�scCs)tjj|tj�|_|j�dS(N(tostpathtjoinR_tEVENT_STATUS_FILERat_load(Rct
status_dir((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pyt
initialize�scCs6|j|||�}|tk|j|<|j�dS(N(RgRlRbRe(RcRhRiRjtstatusRm((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pytmark_event_status�scCsdj|||�S(Ns{0}-{1}-{2}(tformat(RcRhRiRj((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pyRg�scCs�yRi|_tjj|j�rQt|jd��}tj|�|_WdQXnWn2tk
r�}t	j
dj|��i|_nXdS(Ntrs,Exception occurred loading event status: {0}(RbRoRptisfileRatopentjsontloadt	ExceptiontloggertwarnRx(Rctfte((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pyRs�s	cCsby2t|jd��}tj|j|�WdQXWn)tk
r]}tjdj|��nXdS(Ntws+Exception occurred saving event status: {0}(	R{RaR|tdumpRbR~RR�Rx(RcR�R�((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pyRe�s
(R]R^RrRdRfRkRntconftget_lib_dirRuRwRgRsRe(((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pyR_�s							
cCs5tj|�}t�}td||�d|_|S(NR	R|(R|tloadsR	Rt	file_type(tdata_strtdataRm((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pytparse_json_event�s
		cCsby-yt|�SWntk
r+t|�SXWn.tk
r]}tdjt|����nXdS(NsError parsing event: {0}(R�t
ValueErrortparse_xml_eventR~RRxR(R�R�((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pytparse_event�s
cCs�t|d�}t|d�}t|d�}|}|dkrNt|�}n6|dkrit|�}n|dkr�t|�}nt||�S(NtNametValuetTs	mt:uint64smt:bools
mt:float64(RtinttbooltfloatR(t
param_nodeRht	value_strt	attr_typetvalue((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pytparse_xml_param�scCs�y�t|�}tt|d�d�}tt|d�d�}t||�}t|d�}x$|D]}|jjt|��qdWd|_|SWn%t	k
r�}t
t|���nXdS(NtEventtidtProvidertParamtxml(RRRR	Rt
parameterstappendR�R�R~R�R(R�txml_doctevent_idtprovider_idRmtparam_nodesR�R�((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pyR��s
	cCsPt|�dkr|S|tkr&|Sytj|�SWntk
rKdSXdS(s�
    Gzip and base64 encode a message based on the operation.

    The intent of this message is to make the logs human readable and include the
    stdout/stderr from extension operations.  Extension operations tend to generate
    a lot of noise, which makes it difficult to parse the line-oriented waagent.log.
    The compromise is to encode the stdout/stderr so we preserve the data and do
    not destroy the line oriented nature.

    The data can be recovered using the following command:

      $ echo '<encoded data>' | base64 -d | pigz -zd

    You may need to install the pigz command.

    :param op: Operation, e.g. Enable or Install
    :param message: Message to encode
    :return: gzip'ed and base64 encoded message, or the original message
    is<>N(tlentSHOULD_ENCODE_MESSAGE_OPRtcompressR~(Rjtmessage((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pyt_encode_message�s
cCs?|s"tjt||||�ntjt||||�dS(N(Rterrort
_EVENT_MSGtinfo(RhRjR�tdurationt
is_success((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pyt
_log_eventstCollectOrReportEventDebugInfocBsVeZdZdZdZdZed�Zd�Zed��Z	d�Z
d�ZRS(	s,
    This class is used for capturing and reporting debug info that is captured during event collection and
    reporting to wireserver.
    It captures the count of unicode errors and any unexpected errors and also a subset of errors with stacks to help
    with debugging any potential issues.
    itReporttCollectcCs�d|_t�|_d|_t�|_||jkrTtj|_tj	|_
n*||jkr~tj|_tj
|_
ndS(Ni(t3_CollectOrReportEventDebugInfo__unicode_error_counttsett._CollectOrReportEventDebugInfo__unicode_errorst._CollectOrReportEventDebugInfo__op_error_countt)_CollectOrReportEventDebugInfo__op_errorst	OP_REPORTR ROt3_CollectOrReportEventDebugInfo__unicode_error_eventRNt/_CollectOrReportEventDebugInfo__op_errors_eventt
OP_COLLECTR*R)(Rct	operation((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pyRd*s		cCs?d�}||j|j|j�||j|j|j�dS(Nc	SsMd}|dkrItd|d|j|tjdj|��dt�ndS(Ns7DroppedEventsCount: {0}
Reasons (first {1} errors): {2}iRjR�s, R�(t	add_eventRxR�t4_CollectOrReportEventDebugInfo__MAX_ERRORS_TO_REPORTRqtFalse(tcountterrorstoperation_nameterr_msg_format((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pytreport_dropped_events_error9s
!(R�R�R�R�R�R�(RcR�((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pytreport_debug_info7s	cCsK|d7}t|�tjkrG|jdjt|�tj���n|S(Nis{0}: {1}(R�R�R�taddRxRt	tracebackt
format_exc(terror_countR�R�((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pyt_update_errors_and_get_countCs
(cCs"|j|j|j|�|_dS(N(R�R�R�(Rctunicode_err((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pytupdate_unicode_errorJscCs"|j|j|j|�|_dS(N(R�R�R�(Rctop_err((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pytupdate_op_errorNs(R]R^t__doc__R�R�R�RdR�tstaticmethodR�R�R�(((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pyR�s
		tEventLoggercBs�eZd�Zed��Zed��Zed��Zd�Zd�Zd�Z	d�Z
eje
dee�d	e
ed
�Zeje
dee�d	e
d�Zd�Zed
�Zed��Zd�ZRS(cCs�d|_i|_g|_t�}|jjttjt	j
���|jjttjt��|jjttj
tt	j|����|jjttjtt	j|����|jjttjd��|jjttjd��|jjttjd��|jjttjd��|jjttjd��|jjttjd��|jjttjd��|jjttjd��dS(	NtTenantName_UNINITIALIZEDtRoleName_UNINITIALIZEDtRoleInstanceName_UNINITIALIZEDtLocation_UNINITIALIZEDtSubscriptionId_UNINITIALIZEDtResourceGroupName_UNINITIALIZEDtVMId_UNINITIALIZEDi(R`t	event_dirtperiodic_eventst_common_parametersRR�RR
t	OSVersionR�t_get_os_versiont
ExecutionModeRtRAMR�t_get_ramt
Processorst_get_processorst
TenantNametRoleNametRoleInstanceNametLocationtSubscriptionIdtResourceGroupNametVMIdtImageOrigin(Rctosutil((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pyRdSs 				"++cCs%djtj�ttttj��S(Ns{0}:{1}-{2}-{3}:{4}(RxtplatformtsystemRRRtrelease(((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pyR�scCs>y|j�SWn)tk
r9}tjdt|��nXdS(Ns;Failed to get RAM info; will be missing from telemetry: {0}i(t
get_total_memRRR�R(R�R�((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pyR��s
cCs>y|j�SWn)tk
r9}tjdt|��nXdS(NsBFailed to get Processors info; will be missing from telemetry: {0}i(tget_processor_coresRRR�R(R�R�((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pyR��s
cCsSi}x|jD]}|||j<qWyI|j�}|j|tj_|j|tj_|j	|tj
_Wn)tk
r�}tj
dt|��nXy�t|j��}|j�}|j|tj_|j|tj_|j|tj_|j|tj_t|j�|tj_Wn)tk
rN}tj
dt|��nXdS(sZ
        Initializes the common parameters that come from the goal state and IMDS
        sJFailed to get VM info from goal state; will be missing from telemetry: {0}s<Failed to get IMDS info; will be missing from telemetry: {0}N(R�Rht
get_vminfot
tenantNameR
R�R�troleNameR�troleInstanceNameR�R~RR�RRtget_endpointtget_computetlocationR�tsubscriptionIdR�tresourceGroupNameR�tvmIdR�R�timage_originR�(RctprotocolR�tptvminfoR�timds_clientt	imds_info((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pyt#initialize_vminfo_common_parameters�s(c	Cs|jdkr tjd�dSytj|jdd�Wn@ttfk
r|}dj|jt	|��}t
|��nXy�tj|j�}t
|�tkrtjtjdj|jt
|���|j�|d }x0|D]%}tjtjj|j|��q�WnWn@ttfk
rV}dj|jt	|��}t
|��nXtjj|jt	ttj�d���}yNt|d	d
��}|j|jd��WdQXtj|d	|t�Wn4ttfk
r	}dj|�}t
|��nXdS(
Ns7Cannot save event -- Event reporter is not initialized.tmodei�s.Failed to create events folder {0}. Error: {1}sV[PERIODIC] Too many files under: {0}, current count:  {1}, removing oldest event filesi���s>Failed to remove old events from events folder {0}. Error: {1}i@Bs.tmpswb+sutf-8s#Failed to write events to file: {0}(R�R`RR�RtmkdirtIOErrortOSErrorRxRRRotlistdirR�tMAX_NUMBER_OF_EVENTSt
periodic_warntEVERY_MINUTEtsorttremoveRpRqR�ttimeR{twritetencodetrenametAGENT_EVENT_FILE_EXTENSION(	RcR�R�tmsgtexisting_eventstoldest_filest
event_filetfilenamethfile((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pyt
save_event�s<



*cCs
i|_dS(N(R�(Rc((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pytreset_periodic�scCs*||jkp)|j||tj�kS(N(R�Rtnow(Rctdeltath((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pytis_period_elapsed�sitc
Cs�t||t|�|�}
|	s6|j||
�r}|j|d|d|d|d|d|d|�tj�|j|
<ndS(NRjR�R�RiR�t	log_event(thashRRR�RRR�(RcRRhRjR�R�RiR�RtforceR((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pytadd_periodic�s
cCs||r)|r)t||||d|�nttt�}|jjttjt	|���|jjttj
t	|���|jjttjt	|���|jjttjt
|���|jjttjt	|���|jjttjt|���|j|tj��t|�}	y|jtj|	��Wn5tk
rw}
tjtjdjt|
���nXdS(NR�s[PERIODIC] {0}(R�R	tTELEMETRY_EVENT_EVENT_IDtTELEMETRY_EVENT_PROVIDER_IDR�R�RRR�RtVersiont	OperationtOperationSuccessR�tMessagetDurationR�tadd_common_event_parametersRtutcnowRRR|tdumpsRRtperiodic_errortEVERY_FIFTEEN_MINUTESRxR(RcRhRjR�R�RiR�RRmR�R�((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pyR��s
""""""cCs ttt�}|jjttjtj	��|jjttj
tjj
|��|jjttjt|j|����|jjttjtj�jtjj���|jjttjd��|j|tj��t|�}y|jtj|��Wntk
rnXdS(NR(R	tTELEMETRY_LOG_EVENT_IDtTELEMETRY_LOG_PROVIDER_IDR�R�RRt	EventNameR RDtCapabilityUsedRtLogLeveltSTRINGStContext1Rt_clean_up_messagetContext2RR*tstrftimetLoggertLogTimeFormatInUTCtContext3R)RRR|R+R(RctlevelR�RmR�((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pyt
add_log_event�s&+1
c
CsC|r4dj||||�}ttd|d�nttt�}|jjtt	j
t|���|jjtt	jt|���|jjtt	j
t|���|jjtt	jt|���|j|tj��t|�}y|jtj|��Wn5tk
r>}	tjtjdjt|	���nXdS(s�
        Create and save an event which contains a telemetry event.

        :param str category: The category of metric (e.g. "cpu", "memory")
        :param str counter: The specific metric within the category (e.g. "%idle")
        :param str instance: For instanced metrics, the instance identifier (filesystem name, cpu core#, etc.)
        :param value: Value of the metric
        :param bool log_event: If true, log the collected metric in the agent log
        sMetric {0}/{1} [{2}] = {3}tMETRICis[PERIODIC] {0}N(RxR�RR	tTELEMETRY_METRICS_EVENT_IDR#R�R�RR
tCategoryRtCountertInstanceR�R�R)RR*RRR|R+RRR,R-R(
RctcategorytcountertinstanceR�RR�RmR�R�((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pyt
add_metrics
""""cCst|s
|Stjd�}tjd�}|j|�}|rJ|jd�S|j|�}|rl|jd�S|SdS(Ns'^.*(INFO|WARNING|ERROR|VERBOSE)\s*(.*)$s^[0-9:/\-TZ\s.]*\s(.*)$ii(tretcompiletsearchtgroup(R�tlog_level_format_parsertlog_format_parsertextract_level_messagetextract_message((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pyR5"s

c	Csttjt�ttjtj��ttj|jt	j
j��ttjt
j�j�ttjtj��ttjt
j�j��ttjd�g}|jtkr�|jtkr�|jttj|j�ttjt�g�n|j j|�|j j|j!�dS(s�
        This method is called for all events and ensures all telemetry fields are added before the event is sent out.
        Note that the event timestamp is saved in the OpcodeName field.
        RN("RR
t	GAVersionRtContainerIdRtget_container_idt
OpcodeNameR7RR8R9tEventTidt	threadingtcurrent_threadtidenttEventPidRotgetpidtTaskNametgetNametKeywordNameteventIdR"t
providerIdR#textendRt
ExtensionTypeR�t
IsInternalR�R�R�(RcRmtevent_timestampt
common_params((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pyR)Ks(R]R^RdR�R�R�R�RRRRR RYRltstrRR�R!R�R<RER5R)(((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pyR�Rs 	,		#			)cCstS(N(t__event_logger__(((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pytget_event_loggerdscCsUtj�}||krdS||}t|jddd|jd|jd�S(Niii<i�g@�@(RR*R�tdaystsecondstmicroseconds(t	utc_startRtd((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pytelapsed_millisecondshs
 RcCs2ttdtt�d|d|d|d|�dS(NRiR�R�RjR(R�RRbR(RjR�R�R((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pytreport_eventrs	cCs/t|tdtt�d|d|d|�dS(NRiR�R�Rj(R!RRbR(RRjR�R�((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pytreport_periodic{s
cCs�|jdkrKtjd�dj||||�}ttd|d�dSy#|j|||t|�|�Wn6t	k
r�tj
tjdj||||��nXdS(s)
    Send a telemetry event reporting a single instance of a performance counter.
    :param str category: The category of the metric (cpu, memory, etc)
    :param str counter: The name of the metric ("%idle", etc)
    :param str instance: For instanced metrics, the identifier of the instance. E.g. a disk drive name, a cpu core#
    :param     value: The value of the metric
    :param bool log_event: If True, log the metric in the agent log as well
    :param EventLogger reporter: The EventLogger instance to which metric events should be sent
    s@Cannot report metric event -- Event reporter is not initialized.sMetric {0}/{1} [{2}] = {3}R=iNsT[PERIODIC] Cannot cast the metric value. Details of the Metric - {0}/{1} [{2}] = {3}(R�R`RR�RxR�RRER�R�RtEVERY_HALF_HOUR(RBRCRDR�RtreporterR�((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pyt
report_metric�s

#
cCs|j|�dS(N(R(R�Rn((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pyt0initialize_event_logger_vminfo_common_parameters�sicCs�|jdkr9tjd�t||||d|�dSt||||�r�t||||�|j|d|d|d|dt|�d|d|�ndS(Ns6Cannot add event -- Event reporter is not initialized.R�RjR�RiR�R(	R�R`RR�R�tshould_emit_eventRwR�Rb(RhRjR�R�RiR�RRn((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pyR��s
*cCsO|jdkrdS|pt�s&dS|tjjkrK|j||�ndS(s!
    :param level: LoggerLevel of the log event
    :param message: Message
    :param forced: Force write the event even if send_logs_to_telemetry() is disabled
        (NOTE: Remove this flag once send_logs_to_telemetry() is enabled for all events)
    :param reporter:
    :return:
    N(R�R`RRR2tWARNINGR<(R;R�tforcedRn((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pyR<�s	c

Cs}|	jdkr9tjd�t||||d|�dS|	j||d|d|d|dt|�d|d|d|�dS(	Ns?Cannot add periodic event -- Event reporter is not initialized.R�RjR�RiR�RR (R�R`RR�R�R!Rb(
RRhRjR�R�RiR�RR Rn((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pyR!�s
-cCs)|tkr%tj||||�ndS(N(t__event_status_operations__t__event_status__Rw(RhRiRjRv((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pyRw�scCsG|tkpFtdkpFtj|||�pFtj|||�|kS(N(RtRuR`RkRn(RhRiRjRv((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pyRq�scCs
|t_dS(N(RcR�(R�((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pytinit_event_logger�scCstj|�dS(N(RuRu(Rt((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pytinit_event_status�sc
Cs�ttd�r�ttd�r�ttd�r�ttd�}ttd�}ttd�}tj|||�}dj|�}t|dtd|dtj	�ndS(Nt	last_typet
last_valuetlast_tracebackRR�R�Rj(
thasattrtsystgetattrR�tformat_exceptionRqR�R�R RW(RhRxRyRzR�R�((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pytdump_unhandled_err�s	cCstjt|�dS(N(tatexittregisterR(Rh((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pytenable_unhandled_err_dump�s(jR�R|RoR�RFR|RSRR�Rtazurelinuxagent.common.conftcommonR�tazurelinuxagent.common.loggerRt#azurelinuxagent.common.AgentGlobalsRt azurelinuxagent.common.exceptionRRtazurelinuxagent.common.futureRt#azurelinuxagent.common.datacontractRRtazurelinuxagent.common.osutilRt%azurelinuxagent.common.telemetryeventRR	R
RRR
tazurelinuxagent.common.utilsRRt%azurelinuxagent.common.utils.textutilRRRRRtazurelinuxagent.common.versionRRRRRRRt$azurelinuxagent.common.protocol.imdsRtEVENTS_DIRECTORYR�R#R"R>R/R.R�RRRRGtEVENT_FILE_REGEXRR tSHOULD_ENCODE_MESSAGE_LENR/R2RBRXR�tobjectR_RuRPRtR�R�R�R�R�RlR�R�R�RcRdRjRkRlRoRpRYRbR�R<R!RwRqRvRwRR�(((s@/usr/lib/python2.7/site-packages/azurelinuxagent/common/event.pyt<module>s�.(4	?2			
			#	3�