ÇÇ·¼ ¸¯»õ·Î¿î À¯¹° ÆÄÀ̽ã API. | |
Áö±Ý ´Ù¿î·Îµå |
ÇÇ·¼ ¸¯ ¼øÀ§ ¹× ¿ä¾à
±¤°í
- ƯÇã:
- Freeware
- °¡°Ý:
- FREE
- °Ô½ÃÀÚ À̸§:
- Andrew Gross
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://github.com/andrewgross/
ÇÇ·¼ ¸¯ ű×
ÇÇ·¼ ¸¯ ¼³¸í
PyrelicÀº ÆÄÀ̽ãÀ¸·Î ÀÛ¼ºµÈ Newrelic Ŭ¶óÀ̾ðÆ® ¶óÀ̺귯¸®ÀÔ´Ï´Ù.ÀÌ ¶óÀ̺귯¸®¿¡ ´ëÇÑ ¹®¼´Â ÇØ´ç '¹®¼'¹®ÀÚ¿¿¡ Æ÷ÇԵǾî ÀÖÁö¸¸ »õ·Î¿î Relic Ruby API¸¦ °Ë»çÇÏ¿© ÆÄ»ýµÇ¾ú½À´Ï´Ù : https : / / github.com/newrelic/newrelic_apiununiuntently, APIÀÇ ¼³¸í¼°¡ ¸Å¿ì °ß°íÇÏÁö¸¸, ±¸Çö ¼¼ºÎ Á¤º¸´Â ·¹ÀÏ È°¼º ÀÚ¿ø µµ¿ì¹Ì ¶óÀ̺귯¸® ÁÖÀ§¸¦ Áß½ÉÀ¸·Î ÀÌ·ç¾î Áö¹Ç·Î ±¸Çö ¼¼ºÎ Á¤º¸°¡ ²Ï Èñ¼ÒÇÕ´Ï´Ù. ÀÌ°ÍÀº ÆÄÀ̽㿡¼ API¸¦ ÀçÇöÇÏ´Â µ¥ Á¶±Ý ´õ ±î´Ù ·ÓÁö ¸¸ (ÀϺΠ¹Î¹°)¿¡¼ Áö±Ý±îÁö ÀÏÇÑ °Íó·³ º¸ÀÔ´Ï´Ù .InstallationPIP ¼³Ä¡ PyrelicxamplesFrom Pyrelic Import ClientFrom ½Ã°£ °¡Á® ¿À±â Sleepc = Client (Account_id = '12345', API_KEY = 1234567890ABCDEF) ) # ÀϺΠ¸ÞÆ®¸¯ DataMetrics = c.get_metric_data (, , ,'2012-03-28T15 : 48 : 00Z ','2012-03-29T15 : 48 : 00Z '¸ÞÆ®¸¯ÀÇ ¸ÞÆ®¸¯ÀÇ °æ¿ì : metric.name¿¡ "select"°¡ Æ÷ÇÔ µÈ °æ¿ì : "Æò±Õ ¼±Åà ½Ã°£ : % s"% metric.average_value metric.name¿¡ "¾÷µ¥ÀÌÆ® ": Print"Æò±Õ ¾÷µ¥ÀÌÆ® ½Ã°£ : % s "% metric.average_value # API ŸÀÓ ¾Æ¿ôÀ»ÁÖÀÇÇϽʽÿÀ! ½Ãµµ : metrics = c.get_metric_data (,' '' 'Average']. c.get_metric_list ( '123456', RE = 'DAB) k, vÀÇ metrics.iterItems () : "¸ÞÆ®¸¯ À̸§ : % s"% k Àμâ "»ç¿ë °¡´ÉÇÑ Çʵå : % s"% v # ÀÀ¿ë ÇÁ·Î±×·¥¿¡ ´ëÇÑ ÀÀ¿ë ÇÁ·Î±×·¥ = C.View_Applications ()¸¦ ¾Ë¾Æ ³»½Ê½Ã¿À. ÀÀ¿ë ÇÁ·Î±×·¥ : "name : % s"% application.name Àμâ "ID : % s"% application.app_id Àμâ "URL : % s"% application.url # »èÁ¦ application_detletions = c.delete_applications ({ 'app_id': 1234) '¾Û': '³» ÀÀ¿ë ÇÁ·Î±×·¥'}) Len (failed_detletions)ÀÌ 0 : "¸ðµç ÀÀ¿ë ÇÁ·Î±×·¥ÀÌ ¼º°øÀûÀ¸·Î »èÁ¦ µÈ ¸ðµç ÀÀ¿ë ÇÁ·Î±×·¥"À» ÀμâÇÕ´Ï´Ù! "Á¦Ç°ÀÇ È¨ÆäÀÌÁö
ÇÇ·¼ ¸¯ °ü·Ã ¼ÒÇÁÆ®¿þ¾î