Skip to content

Commit

Permalink
Add more information about SRS.
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Sep 5, 2024
1 parent cf13689 commit b97968c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions trunk/src/app/srs_app_heartbeat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ using namespace std;
#include <srs_app_http_conn.hpp>
#include <srs_protocol_amf0.hpp>
#include <srs_kernel_utility.hpp>
#include <srs_app_statistic.hpp>

SrsHttpHeartbeat::SrsHttpHeartbeat()
{
Expand Down Expand Up @@ -61,6 +62,11 @@ srs_error_t SrsHttpHeartbeat::do_heartbeat()

obj->set("device_id", SrsJsonAny::str(device_id.c_str()));
obj->set("ip", SrsJsonAny::str(ip->ip.c_str()));

SrsStatistic* stat = SrsStatistic::instance();
obj->set("server", SrsJsonAny::str(stat->server_id().c_str()));
obj->set("service", SrsJsonAny::str(stat->service_id().c_str()));
obj->set("pid", SrsJsonAny::str(stat->service_pid().c_str()));

if (_srs_config->get_heartbeat_summaries()) {
SrsJsonObject* summaries = SrsJsonAny::object();
Expand Down

0 comments on commit b97968c

Please sign in to comment.