<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Monitoring on man.hwangsehyun.com</title>
    <link>https://man.hwangsehyun.com/tags/monitoring/</link>
    <description>Recent content in Monitoring on man.hwangsehyun.com</description>
    <image>
      <title>man.hwangsehyun.com</title>
      <url>https://man.hwangsehyun.com/images/papermod-cover.png</url>
      <link>https://man.hwangsehyun.com/images/papermod-cover.png</link>
    </image>
    <generator>Hugo -- 0.145.0</generator>
    <language>kr</language>
    <lastBuildDate>Thu, 19 Sep 2024 00:00:00 +0900</lastBuildDate>
    <atom:link href="https://man.hwangsehyun.com/tags/monitoring/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Basic LLM Ops in AWS</title>
      <link>https://man.hwangsehyun.com/posts/llm-ops-in-aws/</link>
      <pubDate>Thu, 19 Sep 2024 00:00:00 +0900</pubDate>
      <guid>https://man.hwangsehyun.com/posts/llm-ops-in-aws/</guid>
      <description>&lt;h2 id=&#34;background&#34;&gt;Background&lt;/h2&gt;
&lt;p&gt;
  &lt;img
    loading=&#34;lazy&#34;
    src=&#34;https://upload.wikimedia.org/wikipedia/commons/8/82/Las_Vegas_slot_machines.jpg&#34;
    alt=&#34;Row of digital-based slot machines inside a casino in Las Vegas&#34;
    
  /&gt;







&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Row of digital-based slot machines inside a casino in Las Vegas: &lt;a
  href=&#34;https://en.wikipedia.org/wiki/Slot_machine#/media/File:Las_Vegas_slot_machines.jpg&#34;
  &gt;Source&lt;/a
&gt;
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;a
  href=&#34;https://arxiv.org/abs/2409.05746&#34;
  &gt;LLMs Will Always Hallucinate, and We Need to Live With This&lt;/a
&gt;
. 프롬프트에 수정이 필요할 때, 비관적인 관점에서는 LLM은 슬롯 머신과 같아서 &lt;a
  href=&#34;https://en.wikipedia.org/wiki/Balloon_effect&#34;
  &gt;풍선 효과&lt;/a
&gt;
를 피할 수 없다. 운이 좋으면 안 되던 것이 될 수도 있겠지만, 되던 것이 안 되던 경우도 비일비재했으며, 자연어를 출력하는 LLM의 특성 상 결국 테스트셋 전체를 LLM에 넣어보고 출력을 사람이 검토하는 작업을 정기적으로 수행했다. Batch job을 수행하고 비개발자와 결과를 검토하는 과정에서 개발자들은 엑셀을 읽고 쓰는 일회용 파이썬 코드를 (무수히 많이) 혼자서만 쓰고 폐기했으며, 이 코드는 서비스에서 돌아가는 코드와 입출력이 달라 테스트 결과도 신뢰할 수 없었다. Batch testing은 통과했으나 실제 서비스에서는 체감 성능이 다른 고통스런 경험을 수도 없이 반복하며, 이 비효율을 발본색원할 수 있는 시스템을 AWS 서비스들과 &lt;a
  href=&#34;https://opentelemetry.io/&#34;
  &gt;&lt;em&gt;OpenTelemetry&lt;/em&gt;&lt;/a
&gt;
를 이용해 구축하고 있다.&lt;/p&gt;</description>
    </item>
    <item>
      <title>SSH Tunnel 기반 배포 &amp; 운영 툴</title>
      <link>https://man.hwangsehyun.com/posts/ssh-tunnel-launchpad/</link>
      <pubDate>Tue, 01 Mar 2022 00:00:00 +0900</pubDate>
      <guid>https://man.hwangsehyun.com/posts/ssh-tunnel-launchpad/</guid>
      <description>&lt;h2 id=&#34;overview&#34;&gt;Overview&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;인터넷은 가능하나 Inbound가 제한된 환경에 놓인 다수의 임베디드 또는 서버 형태의 Linux 머신들을 관리하기 위한 위한 &lt;a
  href=&#34;https://hub.docker.com/r/linuxserver/openssh-server&#34;
  &gt;OpenSSH server container&lt;/a
&gt;
와 Node.js CLI&lt;/li&gt;
&lt;li&gt;회사 특성 상 일부분만 자동화가 가능할 것이므로, 일반적인 SSH 접속과 자동화 모두 고려해 클라우드를 통한 SSH 연결을 기반으로 한 자동화를 기획했습니다.&lt;/li&gt;
&lt;li&gt;&lt;a
  href=&#34;https://man.hwangsehyun.com/project/vision-and-alpr/&#34;
  &gt;다양한 컴퓨터 비전 솔루션&lt;/a
&gt;
의 배포에 사용되었습니다.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
  

  
    
    
      &lt;img
        src=&#34;https://man.hwangsehyun.com/auto-ssh-proxy-Device001.drawio_18056987197896324757.svg&#34;
        
        alt=&#34;enter image description here&#34;
      /&gt;
    
  








&lt;/p&gt;
&lt;h2 id=&#34;technology&#34;&gt;Technology&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;접속 대상 머신에 &lt;a
  href=&#34;https://hub.docker.com/r/jnovack/autossh&#34;
  &gt;&lt;code&gt;autossh&lt;/code&gt; container&lt;/a
&gt;
를 docker와 podman으로 이중화된 형태로 설치해 가용성을 높일 수 있음&lt;/li&gt;
&lt;li&gt;명령을 수행할 장치와 수행할 명령은 json 파일로 정의되고, Node.js CLI는 이 파일들의 경로를 지정해서 실행&lt;/li&gt;
&lt;li&gt;Redis에 stdout, stderr를 임시로 저장하고 SQLite에 영구 저장해 운영 상황을 기록&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
  

  
    
    
      &lt;img
        src=&#34;https://man.hwangsehyun.com/Untitled%20%282%29_6325316159775138629.png&#34;
        
          width=&#34;2000&#34; height=&#34;1791&#34;
        
        alt=&#34;enter image description here&#34;
      /&gt;
    
  








&lt;/p&gt;</description>
    </item>
    <item>
      <title>Monitoring Experiences</title>
      <link>https://man.hwangsehyun.com/tech/monitoring/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://man.hwangsehyun.com/tech/monitoring/</guid>
      <description>&lt;h2 id=&#34;cloudwatch&#34;&gt;CloudWatch&lt;/h2&gt;
&lt;h3 id=&#34;log--metrics-collection&#34;&gt;Log &amp;amp; Metrics Collection&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a
  href=&#34;https://hub.docker.com/r/amazon/cloudwatch-agent&#34;
  &gt;CloudWatch agent container&lt;/a
&gt;
로 Systemd log와 Custom log를 CloudWatch로 수집합니다.&lt;/li&gt;
&lt;li&gt;Request id, Execution id 등 AWS에서 부여한 UUID들을 기준으로 DB를 설계하고 로그에 포함시켜 Tracing을 용이하게 합니다.&lt;/li&gt;
&lt;li&gt;&lt;a
  href=&#34;https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/SubscriptionFilters.html&#34;
  &gt;Subscription filter&lt;/a
&gt;
 기능으로 서비스에서 발생한 중요 로그를 전파합니다.&lt;/li&gt;
&lt;li&gt;EC2, RDS 등의 AWS 서비스에서 기본으로 제공하는 &lt;a
  href=&#34;https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/working_with_metrics.html&#34;
  &gt;CloudWatch metrics&lt;/a
&gt;
 외에도 Custom metrics를 정의해 관심 대상으로 설정합니다.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;monitoring&#34;&gt;Monitoring&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a
  href=&#34;https://docs.aws.amazon.com/sns/latest/dg/sns-email-notifications.html&#34;
  &gt;SNS topic에 email subscription&lt;/a
&gt;
을 추가해 서비스에서 직접 Topic에 메시지를 발송합니다.&lt;/li&gt;
&lt;li&gt;Metric에 Anomaly condition을 정의하고 &lt;a
  href=&#34;https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html&#34;
  &gt;CloudWatch alarm&lt;/a
&gt;
을 설정합니다.&lt;/li&gt;
&lt;li&gt;&lt;a
  href=&#34;https://w1694659396-omq861390.slack.com/apps/A6L22LZNH-aws-chatbot&#34;
  &gt;AWS Chatbot Slack App&lt;/a
&gt;
을 도입해 사내 메신저로 알림을 수신했습니다.
&lt;ul&gt;
&lt;li&gt;CloudWatch alarm state 변경 시&lt;/li&gt;
&lt;li&gt;&lt;a
  href=&#34;https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-instance-state-changes.html&#34;
  &gt;EC2 Instance state change event&lt;/a
&gt;

&lt;blockquote&gt;
&lt;p&gt;EC2 state change event
-&amp;gt; EventBridge
-&amp;gt; SNS
-&amp;gt; AWS ChatBot&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
