mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 14:16:00 +00:00
mnc: implem first commands
This commit is contained in:
parent
1d56b5845d
commit
773d5ed4cf
1 changed files with 13 additions and 3 deletions
|
@ -63,16 +63,26 @@ int main(int argc, char *argv[]) {
|
||||||
cmd = strtok(line, " \t\n");
|
cmd = strtok(line, " \t\n");
|
||||||
arg = strtok(line, " \t\n");
|
arg = strtok(line, " \t\n");
|
||||||
|
|
||||||
if (strlen(cmd) == 0) continue;
|
if (strlen(cmd) == 0) {
|
||||||
|
} else if (strcmp(cmd, "version") == 0) {
|
||||||
if (strcmp(cmd, "version") == 0) {
|
printf("munin c node version: %s\n", VERSION);
|
||||||
} else if (strcmp(cmd, "nodes") == 0) {
|
} else if (strcmp(cmd, "nodes") == 0) {
|
||||||
|
printf("%s\n", host);
|
||||||
|
printf(".\n");
|
||||||
} else if (strcmp(cmd, "quit") == 0) {
|
} else if (strcmp(cmd, "quit") == 0) {
|
||||||
|
return(0);
|
||||||
} else if (strcmp(cmd, "list") == 0) {
|
} else if (strcmp(cmd, "list") == 0) {
|
||||||
} else if (strcmp(cmd, "config") == 0) {
|
} else if (strcmp(cmd, "config") == 0) {
|
||||||
} else if (strcmp(cmd, "fetch") == 0) {
|
} else if (strcmp(cmd, "fetch") == 0) {
|
||||||
} else if (strcmp(cmd, "cap") == 0) {
|
} else if (strcmp(cmd, "cap") == 0) {
|
||||||
|
printf("cap ");
|
||||||
|
if (strlen(spoolfetch_dir)) {
|
||||||
|
printf("spool ");
|
||||||
|
}
|
||||||
|
printf("\n");
|
||||||
} else if (strcmp(cmd, "spoolfetch") == 0) {
|
} else if (strcmp(cmd, "spoolfetch") == 0) {
|
||||||
|
} else {
|
||||||
|
printf("# unknown cmd: %s\n", cmd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue