Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
achawla2012 committed Aug 29, 2023
1 parent d701385 commit 7986331
Show file tree
Hide file tree
Showing 9 changed files with 444 additions and 156 deletions.
64 changes: 32 additions & 32 deletions docs/proto/proto.md
Original file line number Diff line number Diff line change
Expand Up @@ -1556,20 +1556,20 @@ PhpFpmDetails registers a phpfpm master process + child pools

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| type | [string](#string) | | |
| uuid | [string](#string) | | |
| local_id | [string](#string) | | |
| name | [string](#string) | | |
| cmd | [string](#string) | | |
| conf_path | [string](#string) | | |
| bin_path | [string](#string) | | |
| version | [string](#string) | | |
| version_line | [string](#string) | | |
| pid | [int32](#int32) | | |
| agent | [string](#string) | | |
| children | [PhpFpmPool](#f5-nginx-agent-sdk-PhpFpmPool) | repeated | |
| workers | [int32](#int32) | | |
| health | [PhpFpmHealth](#f5-nginx-agent-sdk-PhpFpmHealth) | | |
| type | [string](#string) | | PhpFpm process type |
| uuid | [string](#string) | | System ID |
| local_id | [string](#string) | | PhpFpm ID |
| name | [string](#string) | | PhpFpm process name |
| cmd | [string](#string) | | PhpFpm process descpription Example: php-fpm: master process (/etc/php/7.4/fpm/php-fpm.conf) |
| conf_path | [string](#string) | | Location of PhpFpm config path Example: /etc/php/7.4/fpm/php-fpm.conf |
| bin_path | [string](#string) | | Location of PhpFpm binary path |
| version | [string](#string) | | PhpFpm version |
| version_line | [string](#string) | | PhpFpm version line Example: PHP 7.4.33 (fpm-fcgi) (built: Feb 14 2023 18:31:23) |
| pid | [int32](#int32) | | PhpFpm process id |
| agent | [string](#string) | | NGINX agent version |
| children | [PhpFpmPool](#f5-nginx-agent-sdk-PhpFpmPool) | repeated | PhpFpm children process |
| workers | [int32](#int32) | | PhpFpm master process total workers/children |
| health | [PhpFpmHealth](#f5-nginx-agent-sdk-PhpFpmHealth) | | PhpFpm process health |



Expand All @@ -1584,9 +1584,9 @@ PhpFpmHealth reports the health details of PHPFPM process

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| system_id | [string](#string) | | |
| phpfpm_health_status | [PhpFpmHealth.PhpFpmHealthStatus](#f5-nginx-agent-sdk-PhpFpmHealth-PhpFpmHealthStatus) | | |
| degraded_reason | [string](#string) | | |
| system_id | [string](#string) | | System ID |
| phpfpm_health_status | [PhpFpmHealth.PhpFpmHealthStatus](#f5-nginx-agent-sdk-PhpFpmHealth-PhpFpmHealthStatus) | | PhpFpm health status |
| degraded_reason | [string](#string) | | Provides an error message of why PhpFpm is degraded |



Expand All @@ -1601,17 +1601,17 @@ PhpFpmPool registers one of the worker pools of a Php-Fpm master process

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| type | [string](#string) | | |
| uuid | [string](#string) | | |
| local_id | [string](#string) | | |
| name | [string](#string) | | |
| display_name | [string](#string) | | |
| parent_local_id | [string](#string) | | |
| listen | [string](#string) | | |
| flisten | [string](#string) | | |
| status_path | [string](#string) | | |
| can_have_children | [bool](#bool) | | |
| agent | [string](#string) | | |
| type | [string](#string) | | PhpFpm process type |
| uuid | [string](#string) | | System ID |
| local_id | [string](#string) | | PhpFpm ID |
| name | [string](#string) | | PhpFpm process name |
| display_name | [string](#string) | | PhpFpm display name Example: phpfpm master @ Ubuntu |
| parent_local_id | [string](#string) | | Phpfpm master process ID |
| listen | [string](#string) | | Location for PhpFpm process to listen to connections |
| flisten | [string](#string) | | PhpFpm formated listen |
| status_path | [string](#string) | | PhpFpm status path |
| can_have_children | [bool](#bool) | | Provides info on if PhpFpm process can have child |
| agent | [string](#string) | | NGINX agent version |



Expand All @@ -1623,13 +1623,13 @@ PhpFpmPool registers one of the worker pools of a Php-Fpm master process
<a name="f5-nginx-agent-sdk-PhpFpmHealth-PhpFpmHealthStatus"></a>

### PhpFpmHealth.PhpFpmHealthStatus

Status enum

| Name | Number | Description |
| ---- | ------ | ----------- |
| UNKNOWN | 0 | |
| ACTIVE | 1 | |
| DEGRADED | 2 | |
| UNKNOWN | 0 | Unknown status |
| ACTIVE | 1 | Active status |
| DEGRADED | 2 | Degraded status |



Expand Down
98 changes: 67 additions & 31 deletions sdk/proto/phpfpm.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions sdk/proto/phpfpm.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,45 +7,81 @@ option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";

// PhpFpmDetails registers a phpfpm master process + child pools
message PhpFpmDetails {
// PhpFpm process type
string type = 1 [(gogoproto.jsontag) = "type"];
// System ID
string uuid = 2 [(gogoproto.jsontag) = "uuid"];
// PhpFpm ID
string local_id = 3 [(gogoproto.jsontag) = "local_id"];
// PhpFpm process name
string name = 4 [(gogoproto.jsontag) = "name"];
// PhpFpm process descpription
// Example: php-fpm: master process (/etc/php/7.4/fpm/php-fpm.conf)
string cmd = 5 [(gogoproto.jsontag) = "cmd"];
// Location of PhpFpm config path
// Example: /etc/php/7.4/fpm/php-fpm.conf
string conf_path = 6 [(gogoproto.jsontag) = "conf_path"];
// Location of PhpFpm binary path
string bin_path = 7 [(gogoproto.jsontag) = "bin_path"];
// PhpFpm version
string version = 8 [(gogoproto.jsontag) = "version"];
// PhpFpm version line
// Example: PHP 7.4.33 (fpm-fcgi) (built: Feb 14 2023 18:31:23)
string version_line = 9 [(gogoproto.jsontag) = "version_line"];
// PhpFpm process id
int32 pid = 10 [(gogoproto.jsontag) = "pid"];
// NGINX agent version
string agent = 11 [(gogoproto.jsontag) = "agent"];
// PhpFpm children process
repeated PhpFpmPool children = 12 [(gogoproto.jsontag) = "children"];
// PhpFpm master process total workers/children
int32 workers = 13 [(gogoproto.jsontag) = "workers"];
// PhpFpm process health
PhpFpmHealth health = 14 [(gogoproto.jsontag) = "health"];
}

// PhpFpmPool registers one of the worker pools of a Php-Fpm master process
message PhpFpmPool {
// PhpFpm process type
string type = 1 [(gogoproto.jsontag) = "type"];
// System ID
string uuid = 2 [(gogoproto.jsontag) = "uuid"];
// PhpFpm ID
string local_id = 3 [(gogoproto.jsontag) = "local_id"];
// PhpFpm process name
string name = 4 [(gogoproto.jsontag) = "name"];
// PhpFpm display name
// Example: phpfpm master @ Ubuntu
string display_name = 5 [(gogoproto.jsontag) = "display_name"];
// Phpfpm master process ID
string parent_local_id = 6 [(gogoproto.jsontag) = "parent_local_id"];
// Location for PhpFpm process to listen to connections
string listen = 7 [(gogoproto.jsontag) = "listen"];
// PhpFpm formated listen
string flisten = 8 [(gogoproto.jsontag) = "flisten"];
// PhpFpm status path
string status_path = 9 [(gogoproto.jsontag) = "status_path"];
// Provides info on if PhpFpm process can have child
bool can_have_children = 10 [(gogoproto.jsontag) = "can_have_children"];
// NGINX agent version
string agent = 11 [(gogoproto.jsontag) = "agent"];
}

// PhpFpmHealth reports the health details of PHPFPM process
message PhpFpmHealth {
// Status enum
enum PhpFpmHealthStatus {
// Unknown status
UNKNOWN = 0;
// Active status
ACTIVE = 1;
// Degraded status
DEGRADED = 2;
}
// System ID
string system_id = 1 [(gogoproto.jsontag) = "system_id"];
// PhpFpm health status
PhpFpmHealthStatus phpfpm_health_status = 2 [(gogoproto.jsontag) = "phpfpm_health_status"];
// Provides an error message of why PhpFpm is degraded
string degraded_reason = 3 [(gogoproto.jsontag) = "degraded_reason"];
}
Loading

0 comments on commit 7986331

Please sign in to comment.